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