[lxc-devel] [PATCH] umount $rootfs/lib on errors as well otherwise system ends up with stalled mounts

Serge Hallyn serge.hallyn at ubuntu.com
Tue Oct 22 16:41:31 UTC 2013


Quoting S.Çağlar Onur (caglar at 10ur.org):
> Hi Serge,
> 
> Then there must be something else going on cause without this patch I find
> myself in the situation that I described earlier in this email [1]
> 
> [1] http://sourceforge.net/mailarchive/message.php?msg_id=31539485

Oh - yeah - but it doesn't show up in /proc/self/mounts does it?  What I
think we actually need is:

>From db4e0250bb547f84032584a79dcd84f8ce361ef1 Mon Sep 17 00:00:00 2001
From: Serge Hallyn <serge.hallyn at ubuntu.com>
Date: Tue, 22 Oct 2013 11:34:46 -0500
Subject: [PATCH 1/1] lxc-busybox: don't copy temp mounts into mtab

Signed-off-by: Serge Hallyn <serge.hallyn at ubuntu.com>
---
 templates/lxc-busybox.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/templates/lxc-busybox.in b/templates/lxc-busybox.in
index cbdaaf3..29dc36d 100644
--- a/templates/lxc-busybox.in
+++ b/templates/lxc-busybox.in
@@ -196,7 +196,7 @@ configure_busybox()
     cat <<EOF >$CHPASSWD_FILE
 echo "setting root password to \"root\""
 
-mount --bind /lib $rootfs/lib
+mount -n --bind /lib $rootfs/lib
 if [ \$? -ne 0 ]; then
     echo "Failed bind-mounting /lib at $rootfs/lib"
     exit 1
-- 
1.8.1.2





More information about the lxc-devel mailing list