It'd be worth asking Ram about that.  It's possible he was being overly
cautious as this was new ground, but it seems likely there was a good
reason for it.

Heck, rather than guessing,  cc:ing Ram.  Ram, can you explain the need
for all three parts of that check at pivot_root():

+       if (IS_MNT_SHARED(old_nd.mnt) ||
+               IS_MNT_SHARED(new_nd.mnt->mnt_parent) ||
+               IS_MNT_SHARED(user_nd.mnt->mnt_parent))

?

thanks,
-serge

Quoting Marios Titas (redneb8...@gmail.com):
> It seems that the kernel commit
> 2144440327fa01b2f3f65e355120a78211685702 from 2005 is the culprit.
> It's the commit that implemented mount --move in presense of shared
> mounts. It added a check in fs/namespace.c that makes pivot_root fail
> when the old root is marked as a shared mount. I don't understand the
> reason for that.
> 
> 
> On Mon, Sep 19, 2011 at 09:35, Serge Hallyn <serge.hal...@canonical.com> 
> wrote:
> > Quoting Marios Titas (redneb8...@gmail.com):
> >> Hi list,
> >>
> >> I just ran into this problem: If you do
> >>     # mount --make-shared /
> >> to mark / as a shared mount then lxc-start fails when you have
> >> specified a lxc.rootfs in the configuration file. The error that
> >> lxc-start gives is the following:
> >>     Invalid argument - pivot_root syscall failed
> >> Is this the normal behavior or is this a kernel bug?
> >
> > It is normal behavior.  Perhaps lxc should fall back to chroot when
> > pivot_root fails.
> >
> > -serge
> >

------------------------------------------------------------------------------
BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
Learn about the latest advances in developing for the 
BlackBerry&reg; mobile platform with sessions, labs & more.
See new tools and technologies. Register for BlackBerry&reg; DevCon today!
http://p.sf.net/sfu/rim-devcon-copy1 
_______________________________________________
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users

Reply via email to