Merge lp:~gary/ubuntu/precise/lxc/bug-951150-2 into lp:ubuntu/precise/lxc

Proposed by Gary Poster on 2012-03-12
Status: Merged
Merge reported by: Sebastien Bacher
Merged at revision: not available
Proposed branch: lp:~gary/ubuntu/precise/lxc/bug-951150-2
Merge into: lp:ubuntu/precise/lxc
Diff against target: 39 lines (+7/-1)
1 file modified
debian/local/lxc-start-ephemeral (+7/-1)
To merge this branch: bzr merge lp:~gary/ubuntu/precise/lxc/bug-951150-2
Reviewer Review Type Date Requested Status
Serge Hallyn Approve on 2012-03-13
Ubuntu branches 2012-03-12 Pending
Review via email: mp+97077@code.launchpad.net

Description of the change

It turns out that using an overlayfs as the upperdir of an overlayfs does not work. Files cannot be removed. Perhaps overlayfs does not support xattrs, even though it requires them?

Therefore, this branch adjusts my changes from lp:~gary/ubuntu/precise/lxc/bug-951150 to use a tempfs for the upperdir. Removing files now works.

Thank you

To post a comment you must log in.
Serge Hallyn (serge-hallyn) wrote :

Thanks, merged.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/local/lxc-start-ephemeral'
2--- debian/local/lxc-start-ephemeral 2012-03-12 09:51:59 +0000
3+++ debian/local/lxc-start-ephemeral 2012-03-12 18:16:37 +0000
4@@ -40,6 +40,7 @@
5 sudo lxc-stop -n $LXC_NAME
6 fi
7 if [ $LXC_MOUNTED -eq 1 ]; then
8+ sudo umount $EPHEMERAL_BIND_DIR
9 sudo umount $LXC_DIR
10 sudo umount $OVERLAY_DIR
11 sudo rmdir $LXC_DIR
12@@ -121,6 +122,9 @@
13 LXC_DIR=`sudo mktemp -d --tmpdir=/var/lib/lxc $LXC_BASE-temp-XXXXXXX`
14 LXC_NAME=`basename $LXC_DIR`
15 sudo mount -t overlayfs -oupperdir=$OVERLAY_DIR,lowerdir=/var/lib/lxc/$LXC_BASE none $LXC_DIR
16+ EPHEMERAL_BIND_DIR=$LXC_DIR/ephemeralbind
17+ sudo mkdir $EPHEMERAL_BIND_DIR
18+ sudo mount -t tmpfs none $EPHEMERAL_BIND_DIR
19 LXC_MOUNTED=1
20
21 # Update the ephemeral lxc's configuration to reflect the new container name.
22@@ -140,7 +144,7 @@
23 if [ `echo -n $line | awk '{print $4}'` == "bind" ]; then
24 # ...we should rewrite it as an overlay.
25 source=`echo -n $line | awk '{print $1}'`
26- upperdir=$LXC_DIR/ephemeralbind$source
27+ upperdir=$EPHEMERAL_BIND_DIR$source
28 sudo mkdir -p $upperdir
29 sudo chown `sudo stat -c '%U.%G' $source` $upperdir
30 echo "none $path overlayfs upperdir=$upperdir,lowerdir=$source 0 0";
31@@ -237,6 +241,8 @@
32 echo "Stopping lxc" >&2
33 sudo lxc-stop -n $LXC_NAME
34 sleep 2
35+ # echo "umounting ephemeral_bind_dir $EPHEMERAL_BIND_DIR" >&2
36+ sudo umount $EPHEMERAL_BIND_DIR
37 # echo "umounting lxc_dir $LXC_DIR" >&2
38 sudo umount $LXC_DIR
39 # echo "umounting overlay" >&2

Subscribers

People subscribed via source and target branches

to all changes: