Hi Nulld1g1t,

> On a D8 host server with D7 containers upgraded to D8 with systemd -
> following the instructions from the LXC Debian page.
>
>   When I use lxc-stop command to cleanly stop a container, it waits,
> times out and finally kills the container instead of issuing a clean
> shutdown.

I also ran into this problem, and found a fix for this by looking in
/usr/share/lxc/templates/lxc-debian. That file contains a function
`configure_debian_systemd()`, that (among other useful things) has:

        chroot ${rootfs} ln -s /lib/systemd/system/halt.target 
/etc/systemd/system/sigpwr.target

In other words, when sigpwr.target is activated (special target
activated when systemd receiveds SIGPWR), it should active halt.target
instead, shutting the container down cleanly.

After running this, my upgraded containers also shutdown cleanly.


I'm not sure if stuff like can be made to work automatically on
upgrades - who would be responsible? LXC? Systemd? Some integration
package? Should this bug remain open?

Gr.

Matthijs

Attachment: signature.asc
Description: Digital signature

Reply via email to