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