summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt
diff options
context:
space:
mode:
authorSanju Rakonde <srakonde@redhat.com>2018-06-08 19:39:58 +0530
committerAtin Mukherjee <amukherj@redhat.com>2018-06-13 15:34:08 +0000
commit87f392e7fa22c059a95ff58f1653a285afc0f27a (patch)
tree2aace442cc505fdcd5c63c7b5c69e1e60501c6df /xlators/mgmt
parent8e63ca9bba888df0965f0beeed51a5336e6cb8cd (diff)
glusterd: Fix for shd not coming up
Problem: After creating and starting n(n is large) distribute-replicated volumes using a script, if we create and start (n+1)th distribute-replicate volume manually self heal daemon is down. Solution: In glusterd_proc_stop after giving SIGTERM signal if the process is still running, we are giving a SIGKILL. As SIGKILL will not perform any cleanup process, we need to remove the pidfile. Fixes: bz#1589253 Change-Id: I7c114334eec74c8d0f21b3e45cf7db6b8ef28af1 Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
Diffstat (limited to 'xlators/mgmt')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-messages.h3
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-proc-mgmt.c4
2 files changed, 6 insertions, 1 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-messages.h b/xlators/mgmt/glusterd/src/glusterd-messages.h
index 218071396d9..cb2a558ca53 100644
--- a/xlators/mgmt/glusterd/src/glusterd-messages.h
+++ b/xlators/mgmt/glusterd/src/glusterd-messages.h
@@ -636,7 +636,8 @@ GLFS_MSGID(GLUSTERD,
GD_MSG_LOCALTIME_LOGGING_DISABLE,
GD_MSG_PORTS_EXHAUSTED,
GD_MSG_CHANGELOG_GET_FAIL,
- GD_MSG_MANAGER_FUNCTION_FAILED
+ GD_MSG_MANAGER_FUNCTION_FAILED,
+ GD_MSG_REMOVE_FILE_FAILED
);
#endif /* !_GLUSTERD_MESSAGES_H_ */
diff --git a/xlators/mgmt/glusterd/src/glusterd-proc-mgmt.c b/xlators/mgmt/glusterd/src/glusterd-proc-mgmt.c
index 7400dafc7fa..cb361a76d7a 100644
--- a/xlators/mgmt/glusterd/src/glusterd-proc-mgmt.c
+++ b/xlators/mgmt/glusterd/src/glusterd-proc-mgmt.c
@@ -13,6 +13,7 @@
#include <signal.h>
#include "glusterd.h"
+#include "glusterd-utils.h"
#include "common-utils.h"
#include "xlator.h"
#include "logging.h"
@@ -120,6 +121,9 @@ glusterd_proc_stop (glusterd_proc_t *proc, int sig, int flags)
"reason:%s", pid, strerror(errno));
goto out;
}
+ ret = glusterd_unlink_file (proc->pidfile);
+ if (ret)
+ goto out;
}
ret = 0;