[lxc-users] Stopping a container

Leonid Isaev lisaev at umail.iu.edu
Fri Jan 17 16:54:03 UTC 2014


On Fri, 17 Jan 2014 11:15:46 -0500
"Michael H. Warfield" <mhw at WittsEnd.com> wrote:

> I've seen this problem and I haven't really had time to run it to
> ground.  Mostly, I've seen it when containers did not shut down properly
> from within (something I recently fixed for non-systemd Fedora and
> CentOS containers by intercepting the shutdown process and preventing
> them from reexecing init).
> 
> I strongly suspect that this is from lxc-stop attempting to shut down a
> container in an orderly manner by sending the container init process a
> signal (SIGPWR?  SIGINT?) but the init process does not respond to it
> appropriately.  That eventually results in a timeout in lxc-stop and
> lxc-stop does a hard shutdown then.

According to the manpage, systemd's poweroff.target is isolated after receiving
SIGRTMIN+4. This signal can be specified via lxc.stopsignal (and using
lxc-stop -k) or the newly introduced lxc.shutdown and calling lxc-stop without
-k.

Cheers,
Leonid.

> 
> > Is this normal/expected behavior with other containers, based on
> > different templates (like ubuntu/debian)?
> 
> > regards,
> > DavidS
> 
> Regards,
> Mike



-- 
Leonid Isaev
GnuPG key: 0x164B5A6D
Fingerprint: C0DF 20D0 C075 C3F1 E1BE  775A A7AE F6CB 164B 5A6D
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20140117/8219460a/attachment.pgp>


More information about the lxc-users mailing list