From 2b949eb89e8ca22d2928c05d549b6f722adf1544 Mon Sep 17 00:00:00 2001 From: Gaurav Kumar Garg Date: Fri, 6 Mar 2015 16:11:16 +0530 Subject: 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 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 Reviewed-on: http://review.gluster.org/9821 Reviewed-by: Atin Mukherjee Tested-by: Gluster Build System Reviewed-by: Kaushal M --- xlators/mgmt/glusterd/src/glusterd-handler.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'xlators') 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, -- cgit