summaryrefslogtreecommitdiffstats
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:15:27 -0700
commit34b3b00e5531c3992d913a65f60fe35f78b20f08 (patch)
treea87b3902001321d0d9f757554661458d6ab24b57
parent50a9e209ca58d8690ca9e8f4d3b1fd16ce522b02 (diff)
glusterd/snapd: Stop snapd daemon when glusterd is restarting
Stop snapd daemon when glusterd is coming back, if uss is disabled, or volume is stopped. Change-Id: I4313ecaff19de30f3e9ea76881994509402ed5b0 BUG: 1240952 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/11575 Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
-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 05599d178d2..10c90d5cfc4 100644
--- a/xlators/mgmt/glusterd/src/glusterd-utils.c
+++ b/xlators/mgmt/glusterd/src/glusterd-utils.c
@@ -3678,6 +3678,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);