diff options
author | Atin Mukherjee <amukherj@redhat.com> | 2017-02-09 12:56:38 +0530 |
---|---|---|
committer | Shyamsundar Ranganathan <srangana@redhat.com> | 2017-02-10 06:41:31 -0500 |
commit | 81684fecc7ac6412764f05acd0cb51929a1569a2 (patch) | |
tree | 8761b04d7966e2bb802f0ea66b44c1554c1358f0 /xlators/mgmt/glusterd | |
parent | 2a596acfd054afda5234083b675d5fd4bc171a21 (diff) |
glusterd: ignore return code of glusterd_restart_bricks
When GlusterD is restarted on a multi node cluster, while syncing the
global options from other GlusterD, it checks for quorum and based on
which it decides whether to stop/start a brick. However we handle the
return code of this function in which case if we don't want to start any
bricks the ret will be non zero and we will end up failing the import
which is incorrect.
Fix is just to ignore the ret code of glusterd_restart_bricks ()
>Reviewed-on: https://review.gluster.org/16574
>Smoke: Gluster Build System <jenkins@build.gluster.org>
>NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
>CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
>Reviewed-by: Samikshan Bairagya <samikshan@gmail.com>
>Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
>(cherry picked from commit 55625293093d485623f3f3d98687cd1e2c594460)
Change-Id: I37766b0bba138d2e61d3c6034bd00e93ba43e553
BUG: 1420991
Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
Reviewed-on: https://review.gluster.org/16593
Smoke: Gluster Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Samikshan Bairagya <samikshan@gmail.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-utils.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c index 561bbb4af5b..5fd3727c023 100644 --- a/xlators/mgmt/glusterd/src/glusterd-utils.c +++ b/xlators/mgmt/glusterd/src/glusterd-utils.c @@ -4384,15 +4384,8 @@ glusterd_import_global_opts (dict_t *friend_data) * recompute if quorum is met. If quorum is not met bricks are * not started and those already running are stopped */ - if (old_quorum != new_quorum) { - ret = glusterd_restart_bricks (conf); - if (ret) { - gf_msg ("glusterd", GF_LOG_INFO, 0, - GD_MSG_SERVER_QUORUM_NOT_MET, - "Restarting bricks failed"); - goto out; - } - } + if (old_quorum != new_quorum) + glusterd_restart_bricks (conf); } ret = 0; @@ -5456,6 +5449,7 @@ glusterd_restart_bricks (glusterd_conf_t *conf) } } } + ret = 0; out: conf->restart_done = _gf_true; |