From 60a75cdca76b0a4b83eb6f5bc70a320d586d79aa Mon Sep 17 00:00:00 2001 From: Gaurav Kumar Garg Date: Wed, 10 Sep 2014 17:33:20 +0530 Subject: glusterd: file-snapshot and features-encryption options should be validate correctly By giving non-boolean value to volume set command for features.file-snapshot and features.encryption option the command failed after that subsequent volume set request with valid value of the existing any volume set option fail. Previously when user supplies a non-boolean value in volume set command for features.file-snapshot and features.encryption option's then validation of that value was done by volinfo->dict but actual value of that option store in input dictonary. Now with this change it will refer correct dictonary for validation of supplies value. Change-Id: I4a93d8be848cd33fdf4b4eb9b1a8d15ec9d1e66a BUG: 1140162 Reviewed-on: http://review.gluster.org/8688 Tested-by: Gluster Build System Reviewed-by: Atin Mukherjee Reviewed-by: Kaushal M --- xlators/mgmt/glusterd/src/glusterd-volgen.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'xlators/mgmt') diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c index 7cd95fad5f2..476e3b0c1d9 100644 --- a/xlators/mgmt/glusterd/src/glusterd-volgen.c +++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c @@ -2736,7 +2736,7 @@ client_graph_builder (volgen_graph_t *graph, glusterd_volinfo_t *volinfo, goto out; } - ret = glusterd_volinfo_get_boolean (volinfo, "features.encryption"); + ret = dict_get_str_boolean (set_dict, "features.encryption", _gf_false); if (ret == -1) goto out; if (ret) { @@ -2764,7 +2764,8 @@ client_graph_builder (volgen_graph_t *graph, glusterd_volinfo_t *volinfo, } - ret = glusterd_volinfo_get_boolean (volinfo, "features.file-snapshot"); + ret = dict_get_str_boolean (set_dict, "features.file-snapshot", + _gf_false); if (ret == -1) goto out; if (ret) { -- cgit