[Lxc-users] container shutdown

atp Andrew.Phillips at lmax.com
Tue Jun 1 17:38:16 UTC 2010


Hello,

 Been looking at getting this patch working;

http://lxc.git.sourceforge.net/git/gitweb.cgi?p=lxc/lxc;a=commitdiff;h=563f2f2ccd2891661836c96f92f047a735355c1b;hp=3bdf52d753ecf347b3b5cbff97675032f2de3e5e

This patch allows to shutdown the container when the system
is powered off in the container.

Short summary is I can't get it to work on FC12 host/FC12 container. 
 
I've moved the 
  DEBUG("run level is %c/%c", prevrun_level, currun_level);
  DEBUG("there is %d tasks remaining", ntasks);

 outside of the if statement in utmp_handler
 So they print out everytime the handler is fired. 

On boot I get this: (-s lxc.console=DEBUG -o /tmp/trace.log)

lxc-start 1275412479.567 NOTICE   lxc_start - '/sbin/init' started with
pid '23264'
lxc-start 1275412479.567 DEBUG    lxc_utmp - Added
'/lxc/test01.dev.tradefair/rootfs/var/run/utmp' to inotifywatch
lxc-start 1275412479.573 DEBUG    lxc_cgroup - using cgroup mounted at
'/cgroup'
lxc-start 1275412479.573 DEBUG    lxc_utmp - utmp handler fired
lxc-start 1275412479.573 DEBUG    lxc_utmp - run level is 6/S
lxc-start 1275412479.573 DEBUG    lxc_utmp - there is 2 tasks remaining
lxc-start 1275412479.659 DEBUG    lxc_utmp - utmp handler fired
lxc-start 1275412479.660 DEBUG    lxc_utmp - run level is N/N
lxc-start 1275412479.660 DEBUG    lxc_utmp - there is 5 tasks remaining

So far so good. Now unfortunately, logging into the console as root,
touch -m /var/run/utmp from within the container and without, or copying
the utmp file to tmp and back over itself elicits no further response.

halting or rebooting the container shows no sign the utmp handler is
being fired correctly. 

I've checked timezones and clocks are set. I'm beginning to suspect that
inotify is becoming disabled somehow. The second run shows N/N which
means that its unable to parse the utmp file. Checking with dump_utmp
seems to indicate that the file is not corrupt. Removing the utmp file
and rebooting the container to regenerate it does not help.

I've run out of ideas for now, but if anyone has any thoughts on this
please let me know. 

Andy 

Andrew Phillips
Head of Systems

www.lmax.com 

Office: +44 203 1922509
Mobile: +44 (0)7595 242 900

LMAX | Level 2, Yellow Building | 1 Nicholas Road | London | W11 4AN




The information in this e-mail and any attachment is confidential and is intended only for the named recipient(s). The e-mail may not be disclosed or used by any person other than the addressee, nor may it be copied in any way. If you are not a named recipient please notify the sender immediately and delete any copies of this message. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. Any view or opinions presented are solely those of the author and do not necessarily represent those of the company.




More information about the lxc-users mailing list