diff options
authorKaushal M <>2013-12-10 11:34:06 +0530
committerVijay Bellur <>2014-01-03 03:11:04 -0800
commit52130cb989d32aa302912d2d75e11f4041db2e72 (patch)
parent4dd5f7507eb3009bf9aa85f3accf6ffb5fa42662 (diff)
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: Reviewed-on: Tested-by: Gluster Build System <> Reviewed-by: Vijay Bellur <>
1 files changed, 6 insertions, 0 deletions
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);