[lxc-devel] [Lxc-users] pivot root failures when "/" is mounted as "shared"

Michael H. Warfield mhw at WittsEnd.com
Sat Nov 3 21:46:40 UTC 2012


Additional comments specific to the pivot root issue...  Adding the
developers list as well, since this is a development issue...

On Sat, 2012-11-03 at 12:01 +0100, Peter Simons wrote:
> Hi guys,

> I've been using lxc for a while now, and it's a great tool. Thank you
> very much for the time and effort you have been dedicating to the
> development of that software!

> My Linux distribution (NixOS) is about to switch from upstart to
> systemd, and it this switch in the host system is going to break all my
> containers. It appears this is a well known problem that's been reported
> at

>   http://sourceforge.net/tracker/?func=detail&aid=3559833&group_id=163076&atid=826303

> and

>   https://github.com/lxc/lxc/issues/4.

> Now, I wonder what the status of this issue is. Is it clear how that
> problem can be remedied? Is there maybe a patch that fixes this problem?
> Does anyone know a work-around that I could use to keep my containers
> running when that switch to systemd occurs on the host system?

This was from another threat with the systemd guys.

On Mon, 2012-10-22 at 16:11 +0200, Lennart Poettering wrote:
> Note that there are reports that LXC has issues with the fact that
> newer
> systemd enables shared mount propagation for all mounts by default
> (this
> should actually be beneficial for containers as this ensures that new
> mounts appear in the containers). LXC when run on such a system fails
> as
> soon as it tries to use pivot_root(), as that is incompatible with
> shared mount propagation. The needs fixing in LXC: it should use
> MS_MOVE
> or MS_BIND to place the new root dir in / instead. A short term
> work-around is to simply remount the root tree to private before
> invoking LXC.
> 
> Lennart

> -- 
> Lennart Poettering - Red Hat, Inc.

So there you have a suggested workaround for the shared mount
propagation problem, which is what you are referring to.

ITMT...

Daniel, Serge?

Any thoughts on those comments vis-a-vis the pivot function and using
MS_MOVE or MS_BIND instead?  IIRC, we switched to pivot_root() years ago
to deal with some other issues that were plaguing us.

> Take care,
> Peter
> 
> 
> ------------------------------------------------------------------------------
> LogMeIn Central: Instant, anywhere, Remote PC access and management.
> Stay in control, update software, and manage PCs from one command center
> Diagnose problems and improve visibility into emerging IT issues
> Automate, monitor and manage. Do more in less time with Central
> http://p.sf.net/sfu/logmein12331_d2d
> _______________________________________________
> Lxc-users mailing list
> Lxc-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/lxc-users
> 

-- 
Michael H. Warfield (AI4NB) | (770) 985-6132 |  mhw at WittsEnd.com
   /\/\|=mhw=|\/\/          | (678) 463-0932 |  http://www.wittsend.com/mhw/
   NIC whois: MHW9          | An optimist believes we live in the best of all
 PGP Key: 0x674627FF        | possible worlds.  A pessimist is sure of it!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 482 bytes
Desc: This is a digitally signed message part
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20121103/c4997879/attachment.pgp>


More information about the lxc-devel mailing list