]> git.proxmox.com Git - qemu-server.git/commit - PVE/QemuServer.pm
use KillMode 'process' for systemd scope
authorStefan Reiter <s.reiter@proxmox.com>
Mon, 21 Jun 2021 16:35:41 +0000 (18:35 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 23 Jun 2021 10:02:59 +0000 (12:02 +0200)
commit354e61aacc41446b755d12dfea40957d8f8c9042
treef7b69e041efb2140c73dbc2327317a15ef746b0f
parent3f11f0d7e25ca8540b1f8acdd64c766a681828d2
use KillMode 'process' for systemd scope

KillMode 'none' is deprecated, and systemd loudly complains about that
in the journal. To avoid the warning, but keep the behaviour the same,
use KillMode 'process'.

This mode does two things differently, which we have to stop it from
doing:
* it sends SIGTERM right when the scope is cancelled (e.g. on shutdown)
 -> but only to the "root" process, which in our case is the worker
 instance forking QEMU, so it is already dead by the time this happens
* it sends SIGKILL to *all* children after a timeout
 -> can be avoided by setting either SendSIGKILL to false, or
 TimeoutStopUSec to infinity - for safety, we do both

In my testing, this replicated the previous behaviour exactly, but
without using the deprecated 'none' mode.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
PVE/QemuServer.pm