summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-utils.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-utils.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c
index 84cdfca3049..1e7ebb79c6e 100644
--- a/xlators/mgmt/glusterd/src/glusterd-utils.c
+++ b/xlators/mgmt/glusterd/src/glusterd-utils.c
@@ -4701,7 +4701,10 @@ glusterd_restart_bricks (glusterd_conf_t *conf)
cds_list_for_each_entry (volinfo, &conf->volumes, vol_list) {
if (volinfo->status != GLUSTERD_STATUS_STARTED)
continue;
- start_svcs = _gf_true;
+ if (start_svcs == _gf_false) {
+ start_svcs = _gf_true;
+ glusterd_svcs_manager (NULL);
+ }
gf_log (this->name, GF_LOG_DEBUG, "starting the volume %s",
volinfo->volname);
cds_list_for_each_entry (brickinfo, &volinfo->bricks,
@@ -4714,6 +4717,10 @@ glusterd_restart_bricks (glusterd_conf_t *conf)
cds_list_for_each_entry (volinfo, &snap->volumes, vol_list) {
if (volinfo->status != GLUSTERD_STATUS_STARTED)
continue;
+ if (start_svcs == _gf_false) {
+ start_svcs = _gf_true;
+ glusterd_svcs_manager (NULL);
+ }
start_svcs = _gf_true;
gf_log (this->name, GF_LOG_DEBUG, "starting the snap "
"volume %s", volinfo->volname);
@@ -4725,9 +4732,6 @@ glusterd_restart_bricks (glusterd_conf_t *conf)
}
}
- if (start_svcs)
- glusterd_svcs_manager (NULL);
-
return ret;
}