From 6015ab7d8b37388e836f36a315af54f019839d91 Mon Sep 17 00:00:00 2001 From: Sanju Rakonde Date: Mon, 25 Nov 2019 16:35:42 +0530 Subject: glusterd: start glusterd automatically on abnormal shutdown If glusterd crashes or goes down abnormally, systemd should automatically bring the glusterd up. With this change, systemd brings glusterd up for atmost 3 times within time period of 1 hour. If the limit exceeds, we have to start the glusterd manually and reset the failure count using systemctl reset-failed. credits: John Strunk fixes: bz#1776264 Change-Id: I312d243652fb13ba028814a2ea615b67e3b10b6a Signed-off-by: Sanju Rakonde --- extras/systemd/glusterd.service.in | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'extras') diff --git a/extras/systemd/glusterd.service.in b/extras/systemd/glusterd.service.in index 7c818221845..af10ea18c14 100644 --- a/extras/systemd/glusterd.service.in +++ b/extras/systemd/glusterd.service.in @@ -15,6 +15,11 @@ ExecStart=@prefix@/sbin/glusterd -p @localstatedir@/run/glusterd.pid --log-leve KillMode=process TimeoutSec=300 SuccessExitStatus=15 +Restart=on-abnormal +RestartSec=60 +StartLimitBurst=3 +StartLimitIntervalSec=3600 +StartLimitInterval=3600 [Install] WantedBy=multi-user.target -- cgit