[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: LXC container shutdowns master host



You were ABSOLUTELY right, Karl!

Thank you, problem was solved! I'll try to describe it in details...

We get two instances of operating system -- one is host OS, and another is LXC-container. And they have shared /dev (via bind-mount). Both of them have their own /sbin/init running. I far as I understood, init process recreates /dev/initctl pipe in case it can't find it OR it doesn't belong to it -- approximately every two seconds.

So, half of time we have host's initctl in /dev -- and another half of time we have container's initctl there. And if we issue shutdown command (from host or from container, no matter actually) -- it can end in two equiprobable ways:

1) host goes down (if we get host's initctl in /dev that moment);
2) container goes down (if we get container's initctl in /dev that moment).

10.09.2012 13:36, Karl E. Jorgensen wrote:
Hi

On Mon, Sep 10, 2012 at 08:38:03AM +0100, Andrew Kulikov wrote:
Hi all,

I am using LXC containers to run isolated Debian instances. When I enter
the container (via lxc-console command) and issue shutdown command
inside the container -- master host goes down. It happens if I issue
"shutdown -r", "shutdown -h" or just "shutdown" commands.

It happens not every time -- in some cases behavior is correct: shutdown
command doesn't affect master host and container just goes down.
Have you got /dev bind-mounted to the container? If so, that could
explain it, as they will end up sharing /dev/initctl - which controls
init, and thus controls runlevels and shutdown...



Reply to: