[Lxc-users] On clean reboot of Ubuntu 10.04 containers

Trent W. Buck twb at cybersource.com.au
Tue Dec 7 06:48:15 UTC 2010


I rewrote my init script, too, and now I'm pretty happy.  Example
interactions below.  In the second case, I've dialled the timeout down
to 2s to simulate hung containers.

    root at omega:~# /etc/init.d/lxc restart
    Stopping LXC containers: krb-client failed!
    Killing  LXC containers: kdc ldap.
    Starting LXC containers: kdc krb-client ldap.
    root at omega:~# /etc/init.d/lxc restart
    Stopping LXC containers: krb-client kdc ldap.
    Starting LXC containers: kdc krb-client ldap.
    root at omega:~# /etc/init.d/lxc status
    'kdc' is RUNNING
    'krb-client' is RUNNING
    'ldap' is RUNNING
    root at omega:~#

This uses -INT to signal to the container, so it assumes that containers
are upstart-based and have s/shutdown -r/shutdown -r/ in
/etc/init/control-alt-delete.conf (which is what -INT triggers).

I tried -PWR as was suggested upthread from SuSE, but that appears to be
ignored by upstart (sigh).

-------------- next part --------------
A non-text attachment was scrubbed...
Name: lxc
Type: text/x-sh
Size: 2395 bytes
Desc: lxc sysvinit script
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20101207/fef81f79/attachment.sh>


More information about the lxc-users mailing list