summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd
diff options
context:
space:
mode:
authorAtin Mukherjee <amukherj@redhat.com>2018-11-09 12:44:20 +0530
committerAmar Tumballi <amarts@redhat.com>2018-11-12 03:40:45 +0000
commit9ce088e947d0867ded1bd969d9b22624a59f178b (patch)
tree7efaeb33b3cfd1e4467c67ee53eb248ac2675bcd /xlators/mgmt/glusterd
parent96ae7dd2262a3ac72aea14c69f7404a8f8435a5c (diff)
glusterd: don't call svcs_reconfigure for all volumes during op-version bump up
With having large number of volumes in a configuration having svcs_reconfigure () called for every volumes makes cluster.op-version bump up to time out. Instead call svcs_reconfigure () only once. Change-Id: Ic6a133d77113c992a4dbeaf7f5663b7ffcbb0ae9 Fixes: bz#1648237 Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-op-sm.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
index 3ccc9a3c776..e72bec4e55c 100644
--- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c
+++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
@@ -2568,6 +2568,7 @@ glusterd_op_set_all_volume_options(xlator_t *this, dict_t *dict,
uint32_t op_version = 0;
glusterd_volinfo_t *volinfo = NULL;
glusterd_svc_t *svc = NULL;
+ gf_boolean_t svcs_reconfigure = _gf_false;
conf = this->private;
ret = dict_get_strn(dict, "key1", SLEN("key1"), &key);
@@ -2668,16 +2669,19 @@ glusterd_op_set_all_volume_options(xlator_t *this, dict_t *dict,
goto out;
}
if (GLUSTERD_STATUS_STARTED == volinfo->status) {
- ret = glusterd_svcs_reconfigure();
- if (ret) {
- gf_msg(this->name, GF_LOG_ERROR, 0,
- GD_MSG_SVC_RESTART_FAIL,
- "Unable to restart "
- "services");
- goto out;
- }
+ svcs_reconfigure = _gf_true;
}
}
+ if (svcs_reconfigure) {
+ ret = glusterd_svcs_reconfigure();
+ if (ret) {
+ gf_msg(this->name, GF_LOG_ERROR, 0, GD_MSG_SVC_RESTART_FAIL,
+ "Unable to restart "
+ "services");
+ goto out;
+ }
+ }
+
ret = glusterd_store_global_info(this);
if (ret) {
gf_msg(this->name, GF_LOG_ERROR, 0, GD_MSG_OP_VERS_STORE_FAIL,