2012-06-12 01:25:00 |
Serge Hallyn |
description |
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. |
=========== 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. |
|