summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorshishir gowda <shishirng@gluster.com>2010-09-07 07:35:56 +0000
committerVijay Bellur <vijay@dev.gluster.com>2010-09-07 07:46:18 -0700
commit6066038c7bd96791143a63ed03a617c8cb7020f8 (patch)
treeeaacceda8ee2a825d6fcc89338099d281d5e7f5f
parentf4b1b0af4732e397de3ab3fe2be1dd8bb83614b4 (diff)
Volume info should display transport-type
Signed-off-by: shishir gowda <shishirng@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1230 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1230
-rw-r--r--cli/src/cli3_1-cops.c8
-rw-r--r--doc/gluster.82
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-handler.c5
3 files changed, 13 insertions, 2 deletions
diff --git a/cli/src/cli3_1-cops.c b/cli/src/cli3_1-cops.c
index 5c79a2c6d..064845087 100644
--- a/cli/src/cli3_1-cops.c
+++ b/cli/src/cli3_1-cops.c
@@ -257,7 +257,7 @@ gf_cli3_1_get_volume_cbk (struct rpc_req *req, struct iovec *iov,
char *brick = NULL;
int32_t j = 1;
cli_local_t *local = NULL;
-
+ int32_t transport = 0;
if (-1 == req->rpc_status) {
goto out;
@@ -344,11 +344,17 @@ gf_cli3_1_get_volume_cbk (struct rpc_req *req, struct iovec *iov,
if (ret)
goto out;
+ snprintf (key, 256, "volume%d.transport", i);
+ ret = dict_get_int32 (dict, key, &transport);
+ if (ret)
+ goto out;
cli_out ("Volume Name: %s", volname);
cli_out ("Type: %s", cli_volume_type[type]);
cli_out ("Status: %s", cli_volume_status[status], brick_count);
cli_out ("Number of Bricks: %d", brick_count);
+ cli_out ("Transport-type: %s", ((transport == 0)?
+ "tcp" : "rdma"));
j = 1;
diff --git a/doc/gluster.8 b/doc/gluster.8
index c7e476e97..f1dccf649 100644
--- a/doc/gluster.8
+++ b/doc/gluster.8
@@ -47,7 +47,7 @@ for any corresponding short options.
list information of all volumes
.TP
\fB\ volume create <NEW-VOLNAME> [stripe <COUNT>] [replica <COUNT>] [transport <tcp|rdma>] <NEW-BRICK> ... \fR
-create a new volume of specified type with mentioned bricks
+create a new volume of specified type with mentioned bricks, with specified transport-type [default:tcp]
.TP
\fB\ volume delete <VOLNAME> \fR
delete volume specified by \fB\<VOLNAME>\fR
diff --git a/xlators/mgmt/glusterd/src/glusterd-handler.c b/xlators/mgmt/glusterd/src/glusterd-handler.c
index d0592c3fd..a2563865a 100644
--- a/xlators/mgmt/glusterd/src/glusterd-handler.c
+++ b/xlators/mgmt/glusterd/src/glusterd-handler.c
@@ -323,6 +323,11 @@ glusterd_add_volume_detail_to_dict (glusterd_volinfo_t *volinfo,
if (ret)
goto out;
+ snprintf (key, 256, "volume%d.transport", count);
+ ret = dict_set_int32 (volumes, key, volinfo->transport_type);
+ if (ret)
+ goto out;
+
list_for_each_entry (brickinfo, &volinfo->bricks, brick_list) {
char brick[1024] = {0,};
snprintf (key, 256, "volume%d.brick%d", count, i);