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