e7a346
From 15d1f5b80b1eeb9c8f7d85c72247ffc4ef704267 Mon Sep 17 00:00:00 2001
e7a346
From: Atin Mukherjee <amukherj@redhat.com>
e7a346
Date: Fri, 9 Nov 2018 12:44:20 +0530
e7a346
Subject: [PATCH 445/450] glusterd: don't call svcs_reconfigure for all volumes
e7a346
 during op-version bump up
e7a346
e7a346
With having large number of volumes in a configuration having
e7a346
svcs_reconfigure () called for every volumes makes cluster.op-version bump up to
e7a346
time out. Instead call svcs_reconfigure () only once.
e7a346
e7a346
> Change-Id: Ic6a133d77113c992a4dbeaf7f5663b7ffcbb0ae9
e7a346
> Fixes: bz#1648237
e7a346
> Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
e7a346
e7a346
upstream patch: https://review.gluster.org/#/c/glusterfs/+/21608/
e7a346
e7a346
Change-Id: Ic6a133d77113c992a4dbeaf7f5663b7ffcbb0ae9
e7a346
BUG: 1648210
e7a346
Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
e7a346
Reviewed-on: https://code.engineering.redhat.com/gerrit/156190
e7a346
Tested-by: RHGS Build Bot <nigelb@redhat.com>
e7a346
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
e7a346
---
e7a346
 xlators/mgmt/glusterd/src/glusterd-op-sm.c | 21 +++++++++++----------
e7a346
 1 file changed, 11 insertions(+), 10 deletions(-)
e7a346
e7a346
diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
e7a346
index 716d3f2..8d767cc 100644
e7a346
--- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c
e7a346
+++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
e7a346
@@ -2622,6 +2622,7 @@ glusterd_op_set_all_volume_options (xlator_t *this, dict_t *dict,
e7a346
         glusterd_volinfo_t  *volinfo                = NULL;
e7a346
         glusterd_svc_t      *svc                    = NULL;
e7a346
         gf_boolean_t         start_nfs_svc          = _gf_false;
e7a346
+        gf_boolean_t         svcs_reconfigure       = _gf_false;
e7a346
 
e7a346
         conf = this->private;
e7a346
         ret = dict_get_str (dict, "key1", &key);
e7a346
@@ -2717,15 +2718,16 @@ glusterd_op_set_all_volume_options (xlator_t *this, dict_t *dict,
e7a346
                                 }
e7a346
                                 if (GLUSTERD_STATUS_STARTED
e7a346
                                                  == volinfo->status) {
e7a346
-                                        ret = glusterd_svcs_reconfigure ();
e7a346
-                                        if (ret) {
e7a346
-                                                gf_msg (this->name,
e7a346
-                                                        GF_LOG_ERROR, 0,
e7a346
-                                                        GD_MSG_SVC_RESTART_FAIL,
e7a346
-                                                        "Unable to restart "
e7a346
-                                                        "services");
e7a346
-                                                goto out;
e7a346
-                                        }
e7a346
+                                        svcs_reconfigure = _gf_true;
e7a346
+                                }
e7a346
+                        }
e7a346
+                        if (svcs_reconfigure) {
e7a346
+                                ret = glusterd_svcs_reconfigure();
e7a346
+                                if (ret) {
e7a346
+                                        gf_msg (this->name, GF_LOG_ERROR, 0,
e7a346
+                                                GD_MSG_SVC_RESTART_FAIL,
e7a346
+                                                "Unable to restart services");
e7a346
+                                        goto out;
e7a346
                                 }
e7a346
                         }
e7a346
                         if (start_nfs_svc) {
e7a346
@@ -2758,7 +2760,6 @@ glusterd_op_set_all_volume_options (xlator_t *this, dict_t *dict,
e7a346
         ret = dict_set_str (dup_opt, key, value);
e7a346
         if (ret)
e7a346
                 goto out;
e7a346
-
e7a346
         ret = glusterd_get_next_global_opt_version_str (conf->opts,
e7a346
                                                         &next_version);
e7a346
         if (ret)
e7a346
-- 
e7a346
1.8.3.1
e7a346