summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-op-sm.c
diff options
context:
space:
mode:
authorHari Gowtham <hgowtham@redhat.com>2015-08-21 18:18:09 +0530
committerAtin Mukherjee <amukherj@redhat.com>2015-09-15 08:33:38 -0700
commitbf8d363dc98a19bb88c29aa18f59d664ff60fc76 (patch)
treec88f270ea48651b1adc89e384c7ac11655072cc3 /xlators/mgmt/glusterd/src/glusterd-op-sm.c
parentfdf5c159abafd156f47a6c0bd3e7c955b005b285 (diff)
glusterd: volume status backward compatibility
backport of : http://review.gluster.org/#/c/11986/ 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> >Signed-off-by: Hari Gowtham <hgowtham@redhat.com> Change-Id: I8732991a36d67b97a47025618a6aabe9cc8315e2 BUG: 1260858 Signed-off-by: Hari Gowtham <hgowtham@redhat.com> Reviewed-on: http://review.gluster.org/12120 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-op-sm.c')
-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 a7e810cf7c6..9b78ba5d7cf 100644
--- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c
+++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
@@ -4440,6 +4440,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);
@@ -4499,6 +4502,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) {