]> git.proxmox.com Git - pve-manager.git/commitdiff
service: add restart on-failure to pveproxy and pvedaemon
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 5 Jun 2019 06:47:53 +0000 (08:47 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 5 Jun 2019 06:48:01 +0000 (08:48 +0200)
This way they can cleanly exit (with a SIGTERM or systemctl stop) but
will get restarted if killed or they abort, but only for
StartLimitIntervalSec= time period with a total maximal count of
StartLimitBurst= retries.
See `man systemd.unit` for details, default are 10s total
restart retry period with at max 5 total retry counts, after that the
unit will placed in the failure state. So this is a best effort try
with no real downside.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
services/pvedaemon.service
services/pveproxy.service

index ec9ca03dbc87f325532ae487a80948d825f9d263..f922570f7cd43346cf70a5b52b14e2303f6f0483 100644 (file)
@@ -10,6 +10,7 @@ ExecStop=/usr/bin/pvedaemon stop
 ExecReload=/usr/bin/pvedaemon restart
 PIDFile=/run/pvedaemon.pid
 Type=forking
+Restart=on-failure
 
 [Install]
 WantedBy=multi-user.target
index d73feb0e106fe4cfcc710609c5cafaa796ba2392..8c80ebf1df05a3d264bba2445e6b43b5c5567447 100644 (file)
@@ -16,6 +16,7 @@ ExecStop=/usr/bin/pveproxy stop
 ExecReload=/usr/bin/pveproxy restart
 PIDFile=/run/pveproxy/pveproxy.pid
 Type=forking
+Restart=on-failure
 
 [Install]
 WantedBy=multi-user.target