diff options
author | Raghavendra Bhat <raghavendra@redhat.com> | 2013-10-24 18:55:27 +0530 |
---|---|---|
committer | Raghavendra Bhat <raghavendra@redhat.com> | 2013-10-29 18:27:04 +0530 |
commit | 07422ad21fd23db212f83777b1022350c5560876 (patch) | |
tree | e10ac187da02ef24b073f63a472909dcd00cd49c /cli/src/cli-rpc-ops.c | |
parent | 5ce3051ca7bfb86e8ab1784c85d4064d5042c491 (diff) |
mgmt/glusterd: changes to create consistency group out of volumes
* Also send the proper error back to cli incase of any failure
* Before taking the snap check whether a snap with the requested name
already exists.
Change-Id: I0830b31b1f095dd1d3d968c4f8b3cf46dc32d259
Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
Diffstat (limited to 'cli/src/cli-rpc-ops.c')
-rw-r--r-- | cli/src/cli-rpc-ops.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/cli/src/cli-rpc-ops.c b/cli/src/cli-rpc-ops.c index 58388344e..b50721df8 100644 --- a/cli/src/cli-rpc-ops.c +++ b/cli/src/cli-rpc-ops.c @@ -501,6 +501,9 @@ gf_cli_get_volume_cbk (struct rpc_req *req, struct iovec *iov, char err_str[2048] = {0}; gf_cli_rsp rsp = {0}; int32_t backend = 0; + // snap_volume variable helps in showing whether a volume is a normal + //volume or a volume for the snapshot + int32_t snap_volume = 0; if (-1 == req->rpc_status) goto out; @@ -622,6 +625,11 @@ xml_output: if (ret) goto out; + snprintf (key, sizeof (key), "volume%d.snap_volume", i); + ret = dict_get_int32 (dict, key, &snap_volume); + if (ret) + goto out; + snprintf (key, 256, "volume%d.brick_count", i); ret = dict_get_int32 (dict, key, &brick_count); if (ret) @@ -665,6 +673,10 @@ xml_output: cli_out ("Type: %s", cli_vol_type_str[vol_type]); cli_out ("Volume ID: %s", volume_id_str); cli_out ("Status: %s", cli_vol_status_str[status]); + if (snap_volume) + cli_out ("Snap Volume: %s", "yes"); + else + cli_out ("Snap Volume: %s", "no"); if (backend) goto next; |