|
|
d1681e |
From 747262000fd282ba66b7b1ffd7c51553d8f60de9 Mon Sep 17 00:00:00 2001
|
|
|
d1681e |
From: Sanju Rakonde <srakonde@redhat.com>
|
|
|
d1681e |
Date: Fri, 8 Jun 2018 19:39:58 +0530
|
|
|
d1681e |
Subject: [PATCH 298/305] glusterd: Fix for shd not coming up
|
|
|
d1681e |
|
|
|
d1681e |
Problem: After creating and starting n(n is large) distribute-replicated
|
|
|
d1681e |
volumes using a script, if we create and start (n+1)th distribute-replicate
|
|
|
d1681e |
volume manually self heal daemon is down.
|
|
|
d1681e |
|
|
|
d1681e |
Solution: In glusterd_proc_stop after giving SIGTERM signal if the
|
|
|
d1681e |
process is still running, we are giving a SIGKILL. As SIGKILL will
|
|
|
d1681e |
not perform any cleanup process, we need to remove the pidfile.
|
|
|
d1681e |
|
|
|
d1681e |
>Fixes: bz#1589253
|
|
|
d1681e |
>Change-Id: I7c114334eec74c8d0f21b3e45cf7db6b8ef28af1
|
|
|
d1681e |
>Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
|
|
|
d1681e |
|
|
|
d1681e |
upstream patch: https://review.gluster.org/#/c/20197/
|
|
|
d1681e |
|
|
|
d1681e |
Change-Id: I7c114334eec74c8d0f21b3e45cf7db6b8ef28af1
|
|
|
d1681e |
BUG: 1581184
|
|
|
d1681e |
Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
|
|
|
d1681e |
Reviewed-on: https://code.engineering.redhat.com/gerrit/141526
|
|
|
d1681e |
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
|
|
|
d1681e |
Tested-by: RHGS Build Bot <nigelb@redhat.com>
|
|
|
d1681e |
---
|
|
|
d1681e |
libglusterfs/src/common-utils.c | 3 ---
|
|
|
d1681e |
xlators/mgmt/glusterd/src/glusterd-proc-mgmt.c | 4 ++++
|
|
|
d1681e |
2 files changed, 4 insertions(+), 3 deletions(-)
|
|
|
d1681e |
|
|
|
d1681e |
diff --git a/libglusterfs/src/common-utils.c b/libglusterfs/src/common-utils.c
|
|
|
d1681e |
index 378ed05..fd2f004 100644
|
|
|
d1681e |
--- a/libglusterfs/src/common-utils.c
|
|
|
d1681e |
+++ b/libglusterfs/src/common-utils.c
|
|
|
d1681e |
@@ -3854,9 +3854,6 @@ gf_is_service_running (char *pidfile, int *pid)
|
|
|
d1681e |
ret = lockf (fno, F_TEST, 0);
|
|
|
d1681e |
if (ret == -1)
|
|
|
d1681e |
running = _gf_true;
|
|
|
d1681e |
- if (!pid) {
|
|
|
d1681e |
- goto out;
|
|
|
d1681e |
- }
|
|
|
d1681e |
|
|
|
d1681e |
ret = fscanf (file, "%d", pid);
|
|
|
d1681e |
if (ret <= 0) {
|
|
|
d1681e |
diff --git a/xlators/mgmt/glusterd/src/glusterd-proc-mgmt.c b/xlators/mgmt/glusterd/src/glusterd-proc-mgmt.c
|
|
|
d1681e |
index 8eeec40..ebf4174 100644
|
|
|
d1681e |
--- a/xlators/mgmt/glusterd/src/glusterd-proc-mgmt.c
|
|
|
d1681e |
+++ b/xlators/mgmt/glusterd/src/glusterd-proc-mgmt.c
|
|
|
d1681e |
@@ -12,6 +12,7 @@
|
|
|
d1681e |
#include <limits.h>
|
|
|
d1681e |
#include <signal.h>
|
|
|
d1681e |
|
|
|
d1681e |
+#include "glusterd-utils.h"
|
|
|
d1681e |
#include "common-utils.h"
|
|
|
d1681e |
#include "xlator.h"
|
|
|
d1681e |
#include "logging.h"
|
|
|
d1681e |
@@ -113,6 +114,9 @@ glusterd_proc_stop (glusterd_proc_t *proc, int sig, int flags)
|
|
|
d1681e |
"reason:%s", pid, strerror(errno));
|
|
|
d1681e |
goto out;
|
|
|
d1681e |
}
|
|
|
d1681e |
+ ret = glusterd_unlink_file (proc->pidfile);
|
|
|
d1681e |
+ if (ret)
|
|
|
d1681e |
+ goto out;
|
|
|
d1681e |
}
|
|
|
d1681e |
|
|
|
d1681e |
ret = 0;
|
|
|
d1681e |
--
|
|
|
d1681e |
1.8.3.1
|
|
|
d1681e |
|