[Bug 986385] Re: lxc.mount.entry fails into mnt/subdir

Serge Hallyn 986385 at bugs.launchpad.net
Tue Jun 12 01:25:00 UTC 2012


** Description changed:

+ =========== SRU Justification ===============
+ Impact: containers configured to have host directories bind mounted under
+  subdirectories of /mnt will not see those mounts
+ Development fix: change the directory which lxc uses (in ubuntu templates)
+  for pivot_root from mnt to mnt.putold.
+ Stable fix: same as development fix.
+ Test case:
+  Create a container:
+  	sudo apt-get -y install lxc
+ 	sudo lxc-create -t ubuntu -n p1
+  Create a bind mount under an /mnt subdir of the container:
+  	sudo mkdir -b /var/lib/lxc/p1/rootfs/mnt/etc
+ 	cat << EOF | sudo tee -a /var/lib/lxc/p1/config
+ 	lxc.mount.entry = /etc mnt/etc none bind 0 0
+ 	EOF
+  Start the container, and look under /mnt
+  	sudo lxc-start -n p1
+ 	#(log in as user ubuntu, password ubuntu, and do)
+  	ls /mnt/etc
+ 
+ Regression potential: this simply uses an existing, working lxc configuration
+  variable to use a more sensible location for the pivot_root put_old directory.
+  There should be no regression.
+ =============================================
+ 
  A lxc.mount.entry line like
  
  lxc.mount.entry = /var/lib mnt/series none bind 0 0
  
  fails to mount the host's /var/lib under the container's /mnt/series,
  while
  
  lxc.mount.entry = /var/lib mnt none bind 0 0
  
  works.

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to lxc in Ubuntu.
https://bugs.launchpad.net/bugs/986385

Title:
  lxc.mount.entry fails into mnt/subdir

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/986385/+subscriptions



More information about the Ubuntu-server-bugs mailing list