17b94a
From 143f85f55ded7a9075408e97d05abd9568d56e7b Mon Sep 17 00:00:00 2001
17b94a
From: Sanju Rakonde <srakonde@redhat.com>
17b94a
Date: Mon, 25 Nov 2019 16:35:42 +0530
17b94a
Subject: [PATCH 385/449] glusterd: start glusterd automatically on abnormal
17b94a
 shutdown
17b94a
17b94a
If glusterd crashes or goes down abnormally, systemd should
17b94a
automatically bring the glusterd up.
17b94a
17b94a
With this change, systemd brings glusterd up for atmost 3 times
17b94a
within time period of 1 hour. If the limit exceeds, we have to
17b94a
start the glusterd manually and reset the failure count using
17b94a
systemctl reset-failed.
17b94a
17b94a
credits: John Strunk <jstrunk@redhat.com>
17b94a
17b94a
> upstream patch link: https://review.gluster.org/#/c/glusterfs/+/23751/
17b94a
> fixes: bz#1776264
17b94a
> Change-Id: I312d243652fb13ba028814a2ea615b67e3b10b6a
17b94a
> Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
17b94a
17b94a
BUG: 1663557
17b94a
Change-Id: I312d243652fb13ba028814a2ea615b67e3b10b6a
17b94a
Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
17b94a
Reviewed-on: https://code.engineering.redhat.com/gerrit/202251
17b94a
Tested-by: RHGS Build Bot <nigelb@redhat.com>
17b94a
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
17b94a
---
17b94a
 extras/systemd/glusterd.service.in | 5 +++++
17b94a
 1 file changed, 5 insertions(+)
17b94a
17b94a
diff --git a/extras/systemd/glusterd.service.in b/extras/systemd/glusterd.service.in
17b94a
index f604160..b944762 100644
17b94a
--- a/extras/systemd/glusterd.service.in
17b94a
+++ b/extras/systemd/glusterd.service.in
17b94a
@@ -15,6 +15,11 @@ ExecStart=@prefix@/sbin/glusterd -p @localstatedir@/run/glusterd.pid  --log-leve
17b94a
 KillMode=process
17b94a
 TimeoutSec=300
17b94a
 SuccessExitStatus=15
17b94a
+Restart=on-abnormal
17b94a
+RestartSec=60
17b94a
+StartLimitBurst=3
17b94a
+StartLimitIntervalSec=3600
17b94a
+StartLimitInterval=3600
17b94a
 
17b94a
 [Install]
17b94a
 WantedBy=multi-user.target
17b94a
-- 
17b94a
1.8.3.1
17b94a