summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/mgmt')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-pmap.c6
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-utils.c8
2 files changed, 11 insertions, 3 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-pmap.c b/xlators/mgmt/glusterd/src/glusterd-pmap.c
index 2b60b17841b..292b0c38c05 100644
--- a/xlators/mgmt/glusterd/src/glusterd-pmap.c
+++ b/xlators/mgmt/glusterd/src/glusterd-pmap.c
@@ -564,6 +564,12 @@ __gluster_pmap_signout (rpcsvc_request_t *req)
conf);
sys_unlink (pidfile);
brickinfo->started_here = _gf_false;
+
+ /* Setting the brick status to GF_BRICK_STOPPED to
+ * ensure correct brick status is maintained on the
+ * glusterd end when a brick is killed from the
+ * backend */
+ brickinfo->status = GF_BRICK_STOPPED;
}
}
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c
index 0a89535211f..f8434a7bdc9 100644
--- a/xlators/mgmt/glusterd/src/glusterd-utils.c
+++ b/xlators/mgmt/glusterd/src/glusterd-utils.c
@@ -2137,14 +2137,16 @@ glusterd_volume_stop_glusterfs (glusterd_volinfo_t *volinfo,
ret = 0;
}
- if (del_brick)
- glusterd_delete_brick (volinfo, brickinfo);
-
GLUSTERD_GET_BRICK_PIDFILE (pidfile, volinfo, brickinfo, conf);
gf_msg_debug (this->name, 0, "Unlinking pidfile %s", pidfile);
(void) sys_unlink (pidfile);
brickinfo->started_here = _gf_false;
+ brickinfo->status = GF_BRICK_STOPPED;
+
+ if (del_brick)
+ glusterd_delete_brick (volinfo, brickinfo);
+
out:
return ret;
}