17b94a
From d23859d5cbd5823b2587811aa57030436ce9e74c Mon Sep 17 00:00:00 2001
17b94a
From: Sanju Rakonde <srakonde@redhat.com>
17b94a
Date: Tue, 17 Dec 2019 15:52:30 +0530
17b94a
Subject: [PATCH 391/449] glusterd: unlink the file after killing the process
17b94a
17b94a
In glusterd_proc_stop(), after killing the pid
17b94a
we should remove the pidfile.
17b94a
17b94a
> upstream patch link: https://review.gluster.org/#/c/glusterfs/+/23890/
17b94a
> fixes: bz#1784375
17b94a
> Change-Id: Ib6367aed590932c884b0f6f892fc40542aa19686
17b94a
> Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
17b94a
17b94a
BUG: 1784211
17b94a
Change-Id: Ib6367aed590932c884b0f6f892fc40542aa19686
17b94a
Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
17b94a
Reviewed-on: https://code.engineering.redhat.com/gerrit/202257
17b94a
Tested-by: RHGS Build Bot <nigelb@redhat.com>
17b94a
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
17b94a
---
17b94a
 xlators/mgmt/glusterd/src/glusterd-proc-mgmt.c | 2 ++
17b94a
 1 file changed, 2 insertions(+)
17b94a
17b94a
diff --git a/xlators/mgmt/glusterd/src/glusterd-proc-mgmt.c b/xlators/mgmt/glusterd/src/glusterd-proc-mgmt.c
17b94a
index f55a5fd..a05c90d 100644
17b94a
--- a/xlators/mgmt/glusterd/src/glusterd-proc-mgmt.c
17b94a
+++ b/xlators/mgmt/glusterd/src/glusterd-proc-mgmt.c
17b94a
@@ -107,6 +107,8 @@ glusterd_proc_stop(glusterd_proc_t *proc, int sig, int flags)
17b94a
                        "service, reason:%s",
17b94a
                        proc->name, strerror(errno));
17b94a
         }
17b94a
+    } else {
17b94a
+        (void)glusterd_unlink_file(proc->pidfile);
17b94a
     }
17b94a
     if (flags != PROC_STOP_FORCE)
17b94a
         goto out;
17b94a
-- 
17b94a
1.8.3.1
17b94a