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