From 52130cb989d32aa302912d2d75e11f4041db2e72 Mon Sep 17 00:00:00 2001 From: Kaushal M Date: Tue, 10 Dec 2013 11:34:06 +0530 Subject: glusterd: Save/restore/sync rebalance dict A dictionary was added to store additional information of a rebalance process, like the bricks being removed in case of a rebalance started by remove-brick. This dictionary wasn't being stored/restored or synced during volume sync, leading to errors like a volume status command failing. These issues have been fixed in this patch. The rebalance dict is now stored/restored and also exported/imported during volume sync. Also, this makes sure that the rebalance dict is only create on remove-brick start. This adds a bricks decommissioned status to the information imported/exported during volume sync. BUG: 1040809 Change-Id: I46cee3e4e34a1f3266a20aac43368854594f01bc Signed-off-by: Kaushal M Backport-of: http://review.gluster.org/6492 Reviewed-on: http://review.gluster.org/6524 Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- xlators/mgmt/glusterd/src/glusterd-utils.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c index be614f9bb48..fe20e95f276 100644 --- a/xlators/mgmt/glusterd/src/glusterd-utils.c +++ b/xlators/mgmt/glusterd/src/glusterd-utils.c @@ -3219,6 +3219,12 @@ glusterd_import_volinfo (dict_t *vols, int count, "for volume."); goto out; } + ret = gd_import_friend_volume_rebal_dict (vols, count, new_volinfo); + if (ret) { + snprintf (msg, sizeof (msg), "Failed to import rebalance dict " + "for volume."); + goto out; + } memset (key, 0, sizeof (key)); snprintf (key, 256, "volume%d."GLUSTERD_STORE_KEY_RB_STATUS, count); -- cgit