summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd
diff options
context:
space:
mode:
authorHari Gowtham <hgowtham@redhat.com>2015-08-21 18:18:09 +0530
committerAtin Mukherjee <amukherj@redhat.com>2015-09-07 09:19:05 -0700
commit53cd14b75f65ef602c766fce6ab7b8a25ca5b514 (patch)
tree97199d583388220b69aa44482f4030e4c8c1eb11 /xlators/mgmt/glusterd
parentdd09c684e0baec6ecde5736a1486f2bc4d3213ef (diff)
glusterd: volume status backward compatibility
volume status message of 3.7 does not display all the brick in a mixed cluster(3.6 and 3.7). it displays the bricks in 3.7 and misses bricks in 3.6 due to the key difference for ports. Status of volume: vol1 Gluster process TCP Port RDMA Port Online Pid ------------------------------------------------------------------------------ Brick 10.70.42.171:/data/gluster/tier/cbr2 49153 0 Y 13494 Brick 10.70.42.203:/data/gluster/tier/cbr2 49154 0 Y 27686 NFS Server on localhost N/A N/A N N/A NFS Server on dhcp42-203.lab.eng.blr.redhat .com N/A N/A N N/A Task Status of Volume vol1 ------------------------------------------------------------------------------ There are no active volume tasks Change-Id: Icf0dc01a3d21d0889c43e2868c646a0c7e07ff25 BUG: 1255694 Signed-off-by: Hari Gowtham <hgowtham@redhat.com> Reviewed-on: http://review.gluster.org/11986 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: mohammed rafi kc <rkavunga@redhat.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-op-sm.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
index 73121250f1e..c098c274992 100644
--- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c
+++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
@@ -4436,6 +4436,9 @@ glusterd_op_modify_op_ctx (glusterd_op_t op, void *ctx)
glusterd_conf_t *conf = NULL;
char *volname = NULL;
glusterd_volinfo_t *volinfo = NULL;
+ char *port = 0;
+ int i = 0;
+ char key[1024] = {0,};
this = THIS;
GF_ASSERT (this);
@@ -4495,6 +4498,17 @@ glusterd_op_modify_op_ctx (glusterd_op_t op, void *ctx)
if (ret)
goto out;
+ for (i = 0; i <= brick_index_max; i++) {
+ memset (key, 0, sizeof (key));
+ snprintf (key, sizeof (key), "brick%d.rdma_port", i);
+ ret = dict_get_str (op_ctx, key, &port);
+ if (ret) {
+ ret = dict_set_str (op_ctx, key, "\0");
+ if (ret)
+ goto out;
+ }
+ }
+
glusterd_volinfo_find (volname, &volinfo);
if (conf->op_version < GD_OP_VERSION_3_7_0 &&
volinfo->transport_type == GF_TRANSPORT_RDMA) {