summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src
diff options
context:
space:
mode:
authorRavishankar N <ravishankar@redhat.com>2014-03-05 04:46:50 +0000
committerVijay Bellur <vbellur@redhat.com>2014-03-08 23:24:08 -0800
commitdec7950d4b0944697e4bb8788cc02de2ac4d8708 (patch)
tree335567421c3be99231660265a0069747ce044496 /xlators/mgmt/glusterd/src
parentf1c4c9e6d47b637939b62b473178e1c3095651fc (diff)
glusterd: send/receive volinfo->caps during peer probe.
Problem: volinfo->caps was not sent over to newly probed peers, resulting in a 'Peer Rejected' state due to volinfo checksum mismatch. Fix: send/receive volinfo capability when peer probing. Change-Id: I2508d3fc7a6e4aeac9c22dd7fb2d3b362f4c21ff BUG: 1072720 Signed-off-by: Ravishankar N <ravishankar@redhat.com> Reviewed-on: http://review.gluster.org/7186 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaushal M <kaushal@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-utils.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c
index 3eefe36edf1..6393c554e43 100644
--- a/xlators/mgmt/glusterd/src/glusterd-utils.c
+++ b/xlators/mgmt/glusterd/src/glusterd-utils.c
@@ -2145,6 +2145,13 @@ glusterd_add_volume_to_dict (glusterd_volinfo_t *volinfo,
memset (key, 0, sizeof (key));
snprintf (key, sizeof (key), "volume%d.client-op-version", count);
ret = dict_set_int32 (dict, key, volinfo->client_op_version);
+ if (ret)
+ goto out;
+
+ /*Add volume Capability (BD Xlator) to dict*/
+ memset (key, 0 ,sizeof (key));
+ snprintf (key, sizeof (key), "volume%d.caps", count);
+ ret = dict_set_int32 (dict, key, volinfo->caps);
out:
GF_FREE (volume_id_str);
@@ -3303,6 +3310,11 @@ glusterd_import_volinfo (dict_t *vols, int count,
new_volinfo->client_op_version = 1;
}
+ memset (key, 0 ,sizeof (key));
+ snprintf (key, sizeof (key), "volume%d.caps", count);
+ /*This is not present in older glusterfs versions, so ignore ret value*/
+ ret = dict_get_int32 (vols, key, &new_volinfo->caps);
+
ret = glusterd_import_bricks (vols, count, new_volinfo);
if (ret)
goto out;