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