diff options
author | Kaushal M <kaushal@redhat.com> | 2014-10-28 13:06:50 +0530 |
---|---|---|
committer | Krishnan Parthasarathi <kparthas@redhat.com> | 2014-10-29 22:27:32 -0700 |
commit | 96e1c33b681b34124bdc78174a21865623c9795b (patch) | |
tree | a81014e9b09c799f0081394fc2587714b2473721 /xlators/mgmt/glusterd/src | |
parent | 20efa36ed961a210cfc2cec7599acf92cec157ce (diff) |
glusterd: Store rebalance state on all peers
The rebalance state was being saved only on the peers participating in
the rebalance on a rebalance start. This change makes sure all nodes
save the rebalance state.
Change-Id: I436e5c34bcfb88f7da7378cec807328ce32397bc
BUG: 1157979
Signed-off-by: Kaushal M <kaushal@redhat.com>
Reviewed-on: http://review.gluster.org/8998
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-rebalance.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-rebalance.c b/xlators/mgmt/glusterd/src/glusterd-rebalance.c index dac36d4bf1f..fd63a9bafc6 100644 --- a/xlators/mgmt/glusterd/src/glusterd-rebalance.c +++ b/xlators/mgmt/glusterd/src/glusterd-rebalance.c @@ -733,8 +733,18 @@ glusterd_op_rebalance (dict_t *dict, char **op_errstr, dict_t *rsp_dict) uuid_parse (task_id_str, volinfo->rebal.rebalance_id) ; volinfo->rebal.op = GD_OP_REBALANCE; } - if (!gd_should_i_start_rebalance (volinfo)) + if (!gd_should_i_start_rebalance (volinfo)) { + /* Store the rebalance-id and rebalance command even if + * the peer isn't starting a rebalance process. On peers + * where a rebalance process is started, + * glusterd_handle_defrag_start performs the storing. + * + * Storing this is needed for having 'volume status' + * work correctly. + */ + glusterd_store_perform_node_state_store (volinfo); break; + } ret = glusterd_handle_defrag_start (volinfo, msg, sizeof (msg), cmd, NULL, GD_OP_REBALANCE); break; |