[systemd-devel] [PATCH] units: use KillMode=mixed for systemd-nspawn at .service

Zbigniew Jędrzejewski-Szmek zbyszek at in.waw.pl
Fri May 30 06:39:48 PDT 2014


On Thu, May 29, 2014 at 01:17:25AM +1000, Jonathan Liu wrote:
> This causes the container to shut down cleanly when the service is
> stopped.
> ---
>  units/systemd-nspawn at .service.in | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/units/systemd-nspawn at .service.in b/units/systemd-nspawn at .service.in
> index ff36e90..e373628 100644
> --- a/units/systemd-nspawn at .service.in
> +++ b/units/systemd-nspawn at .service.in
> @@ -11,6 +11,7 @@ Documentation=man:systemd-nspawn(1)
>  
>  [Service]
>  ExecStart=@bindir@/systemd-nspawn --quiet --keep-unit --boot --link-journal=guest --directory=/var/lib/container/%i
> +KillMode=mixed
>  Type=notify
Took me a while to test properly, but indeed, this fixes container shutdown.
Applied.

Zbyszek


More information about the systemd-devel mailing list