]> git.proxmox.com Git - pve-manager.git/commit
pve-manager.service: do not allow stop to timeout
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 8 Sep 2017 14:31:26 +0000 (16:31 +0200)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Mon, 11 Sep 2017 07:34:02 +0000 (09:34 +0200)
commita26ddafe22faaec0ad4950254823e73955e1b7ef
tree299e0d7a05b8257ecef9787b85990ff2f627e92a
parent6760ab924864d03cc5afffcdd097d2158ea80ebc
pve-manager.service: do not allow stop to timeout

This services is responsible for bringing up 'onboot' marked guests
on host power-on and stop _all_ guests gracefully on host shutdown
(be it reboot, shutdow, halt, ..)

It's type is set to 'oneshot', which implies a TimeoutStartSec of
'infinity', by default. With Jessies Version of Systemd the
TimeoutStopSec defaulted to TimeoutStartSec, if not set – so also
'infinity'.
But, Debian Stretchs Version of Systemd makes TimeoutStopSec defaults
to 'DefaultTimeoutStopSec' if it was not set, which is by default 90
seconds – much less than infinity.

This may cause non-gracefull shutdowns of guests, as after the 90
seconds systemd sends a SIGKILL to the pvesh 'stopall' process.
This may end in a bad guest state then. But besides that it can also
lead to a hanging shutdown in some cirumstancesm, as some guest still
operated on storages, so systemd-shutdown - the binary which gets
exec'ed by systemd to become the new PID 1 cannot finish its
sync/umount/shutdown procedure. It has a watchdog armed on sync, if
that triggers you may even get a fully shut down system.
Else it can possibly hang forever, at least until the power plug gets
pulled or similar actions are taken.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
bin/init.d/pve-manager.service