Quoting Michael H. Warfield (m...@wittsend.com):
> On Thu, 2012-10-25 at 20:30 -0500, Serge Hallyn wrote:
> > Quoting Michael H. Warfield (m...@wittsend.com):
> > > On Thu, 2012-10-25 at 23:38 +0200, Lennart Poettering wrote:
> > > > On Thu, 25.10.12 11:59, Michael H. Warfield (m...@wittsend.com) wrote:
> > > 
> > > > > I've got some more problems relating to shutting down containers, some
> > > > > of which may be related to mounting tmpfs on /run to which /var/run is
> > > > > symlinked to.  We're doing halt / restart detection by monitoring utmp
> > > > > in that directory but it looks like utmp isn't even in that directory
> > > > > anymore and mounting tmpfs on it was always problematical.  We may 
> > > > > have
> > > > > to have a more generic method to detect when a container has shut down
> > > > > or is restarting in that case.
> > > 
> > > > I can't parse this. The system call reboot() is virtualized for
> > > > containers just fine and the container managaer (i.e. LXC) can check for
> > > > that easily.
> > > 
> > > The problem we have had was with differentiating between reboot and halt
> > > to either shut the container down cold or restarted it.  You say
> > > "easily" and yet we never came up with an "easy" solution and monitored
> > > utmp instead for the next runlevel change.  What is your "easy" solution
> > > for that problem?
> 
> > I think you're on older kernels, where we had to resort to that.  Pretty
> > recently Daniel Lezcano's patch was finally accepted upstream, which lets
> > a container call reboot() and lets the parent of init tell whether it
> > called reboot or shutdown by looking at wTERMSIG(status).
> 
> Now THAT is wonderful news!  I hadn't realized that had been accepted.
> So we no longer need to rely on the old utmp kludge?

Yup :)  It was very liberating, in terms of what containers can do with
mounting.

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users

Reply via email to