summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-handler.c
diff options
context:
space:
mode:
authorGaurav Kumar Garg <ggarg@redhat.com>2015-03-06 16:11:16 +0530
committerKaushal M <kaushal@redhat.com>2015-04-01 05:50:44 -0700
commit2b949eb89e8ca22d2928c05d549b6f722adf1544 (patch)
tree655a1c35ed0d73cd4d3d15f2bcb651250ea6be35 /xlators/mgmt/glusterd/src/glusterd-handler.c
parent59b1c24c81fe6aa0721a5a60de15b8978c3690ea (diff)
glusterd: gluster command should retrieve current op-version of the NODE
Problem: glusterd was failing to get some specific volume option. for eg: gluster volume get <vol-name> cluster.op-version Fix: glusterd should set count value in dictionary while retrieving specific volume option. Change-Id: Iada768ea3d8a0006895525eca2c2dcc40432a4ea BUG: 1199451 Signed-off-by: Gaurav Kumar Garg <ggarg@redhat.com> Reviewed-on: http://review.gluster.org/9821 Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaushal M <kaushal@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-handler.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-handler.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-handler.c b/xlators/mgmt/glusterd/src/glusterd-handler.c
index 62fc0e6f053..7cd05f40ddf 100644
--- a/xlators/mgmt/glusterd/src/glusterd-handler.c
+++ b/xlators/mgmt/glusterd/src/glusterd-handler.c
@@ -4361,6 +4361,16 @@ glusterd_get_volume_opts (rpcsvc_request_t *req, dict_t *dict)
" details", key);
}
}
+
+ /* Request is for a single option, explicitly set count to 1
+ * in the dictionary.
+ */
+ ret = dict_set_int32 (dict, "count", 1);
+ if (ret) {
+ gf_log (this->name, GF_LOG_ERROR, "Failed to set count "
+ "value in the dictionary");
+ goto out;
+ }
} else {
/* Handle the "all" volume option request */
ret = glusterd_get_default_val_for_volopt (dict, _gf_true, NULL,