summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorAvra Sengupta <asengupt@redhat.com>2015-07-08 14:18:19 +0530
committerRajesh Joseph <rjoseph@redhat.com>2015-07-08 23:18:36 -0700
commit30926da5426f95a5eaf0b3f0e61f7ef4172daa36 (patch)
tree284d20081f9db2e0d98b80619ffd451f9b125ba7 /xlators
parentcd059fb2bf00f5fcb72dac2379db34a5622f1d08 (diff)
glusterd/snapd: Stop snapd daemon when glusterd is restarting
Backport of http://review.gluster.org/#/c/11575/ Stop snapd daemon when glusterd is coming back, if uss is disabled, or volume is stopped. Change-Id: I4313ecaff19de30f3e9ea76881994509402ed5b0 BUG: 1240955 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/11576 Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-utils.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c
index 0c0c0420ef5..d970d6629ec 100644
--- a/xlators/mgmt/glusterd/src/glusterd-utils.c
+++ b/xlators/mgmt/glusterd/src/glusterd-utils.c
@@ -3682,6 +3682,12 @@ glusterd_delete_stale_volume (glusterd_volinfo_t *stale_volinfo,
(void) gf_store_handle_destroy (stale_volinfo->shandle);
stale_volinfo->shandle = NULL;
}
+
+ /* Marking volume as stopped, so that svc manager stops snapd
+ * and we are deleting the volume.
+ */
+ stale_volinfo->status = GLUSTERD_STATUS_STOPPED;
+
if (!stale_volinfo->is_snap_volume) {
svc = &(stale_volinfo->snapd.svc);
(void) svc->manager (svc, stale_volinfo, PROC_START_NO_WAIT);