summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt
diff options
context:
space:
mode:
authorRajesh Joseph <rjoseph@redhat.com>2013-05-27 13:13:03 +0530
committerVijay Bellur <vbellur@redhat.com>2013-06-06 12:03:15 -0700
commit50ae4e3eee81b746df60ce723dfe1c5659fa6fba (patch)
tree0c82a79d8d72348af0ecf02e6c9512895f08e4b5 /xlators/mgmt
parent5eae1db04bb9125032eb31c456d29939ad0f3a03 (diff)
nfs: gluster volume set help shows null as default value
Bug(967445): The default value for all nfs options is displayed as "(null)" Fix: Changed nfs options to show default value. Change-Id: I3b1f27439c19a6655f7dcc7891df40706db9e474 BUG: 967445 Signed-off-by: Rajesh Joseph <rjoseph@redhat.com> Reviewed-on: http://review.gluster.org/5098 Reviewed-by: Santosh Pradhan <spradhan@redhat.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'xlators/mgmt')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-volgen.c28
1 files changed, 17 insertions, 11 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c
index 31e9fa37934..73f966c9745 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volgen.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c
@@ -1925,8 +1925,6 @@ _free_xlator_opt_key (char *key)
int
glusterd_get_volopt_content (dict_t * ctx, gf_boolean_t xml_out)
{
-
- char *xlator_type = NULL;
void *dl_handle = NULL;
volume_opt_list_t vol_opt_handle = {{0},};
char *key = NULL;
@@ -1959,21 +1957,29 @@ glusterd_get_volopt_content (dict_t * ctx, gf_boolean_t xml_out)
descr = vme->description;
def_val = vme->value;
} else {
- if (_get_xlator_opt_key_from_vme (vme, &key))
+ if (_get_xlator_opt_key_from_vme (vme, &key)) {
+ gf_log ("glusterd", GF_LOG_DEBUG, "Failed to "
+ "get %s key from volume option entry",
+ vme->key);
goto out; /*Some error while geting key*/
+ }
- if (!xlator_type || strcmp (vme->voltype, xlator_type)){
- ret = xlator_volopt_dynload (vme->voltype,
- &dl_handle,
- &vol_opt_handle);
- if (ret) {
- ret = 0;
- goto cont;
- }
+ ret = xlator_volopt_dynload (vme->voltype,
+ &dl_handle,
+ &vol_opt_handle);
+
+ if (ret) {
+ gf_log ("glusterd", GF_LOG_DEBUG,
+ "xlator_volopt_dynload error(%d)", ret);
+ ret = 0;
+ goto cont;
}
+
ret = xlator_option_info_list (&vol_opt_handle, key,
&def_val, &descr);
if (ret) { /*Swallow Error i.e if option not found*/
+ gf_log ("glusterd", GF_LOG_DEBUG,
+ "Failed to get option for %s key", key);
ret = 0;
goto cont;
}