[pve-devel] [PATCH ha-manager 4/4] tell systemd to restart CRM and LRM on failures
Thomas Lamprecht
t.lamprecht at proxmox.com
Fri Sep 9 16:15:37 CEST 2016
If the CRM or LRM services do not exit clean it should be restarted,
as they are critical to HA. Quoting the systemd.service docs:
> In this context, a clean exit means an exit code of 0, or one of
> the signals SIGHUP, SIGINT, SIGTERM or SIGPIPE.
The service may still be stopped through a systemctl stop ...
command
Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
---
debian/pve-ha-crm.service | 1 +
debian/pve-ha-lrm.service | 1 +
2 files changed, 2 insertions(+)
diff --git a/debian/pve-ha-crm.service b/debian/pve-ha-crm.service
index ef8cd61..b96dd54 100644
--- a/debian/pve-ha-crm.service
+++ b/debian/pve-ha-crm.service
@@ -16,6 +16,7 @@ ExecStop=/usr/sbin/pve-ha-crm stop
PIDFile=/var/run/pve-ha-crm.pid
TimeoutStopSec=65
Type=forking
+Restart=on-failure
[Install]
WantedBy=multi-user.target
diff --git a/debian/pve-ha-lrm.service b/debian/pve-ha-lrm.service
index 3dc2ebc..6cc4520 100644
--- a/debian/pve-ha-lrm.service
+++ b/debian/pve-ha-lrm.service
@@ -21,6 +21,7 @@ PIDFile=/var/run/pve-ha-lrm.pid
TimeoutStopSec=95
KillMode=process
Type=forking
+Restart=on-failure
[Install]
WantedBy=multi-user.target
--
2.1.4
More information about the pve-devel
mailing list