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