diff options
author | Krutika Dhananjay <kdhananj@redhat.com> | 2012-09-04 15:08:56 +0530 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2012-09-05 07:46:56 -0700 |
commit | 9d0da50fdeb8ae235d34d7990a2bc28adf52434c (patch) | |
tree | 76d40d9f4826bf1ff1a025666d1264572386ca01 /xlators/mgmt/glusterd/src/glusterd-op-sm.c | |
parent | a06a074b8cf3444acabca9003ae98539029453b0 (diff) |
glusterd: Made volume reset recognize options in <domain>.<specifier> format
PROBLEM:
Volume reset command does not reset options when specified in
<domain>.<specifier> format.
FIX:
Changed glusterd_options_reset to use "key" (as opposed to "key_fixed")
to fetch "value" in a way that ensures "key" ALWAYS holds the option
name in its fully qualified form, irrespective of whether the option
was specified in its fully qualified format or in short form.
Change-Id: Ibc3a87f4d29cb09e34b54c4b5ead564fefade350
BUG: 847846
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-on: http://review.gluster.org/3901
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Csaba Henk <csaba@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-op-sm.c')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-op-sm.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c index f0d7bc48919..aea27500d6a 100644 --- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c +++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c @@ -899,13 +899,15 @@ glusterd_options_reset (glusterd_volinfo_t *volinfo, char *key, ret = -1; goto out; } - value = dict_get (volinfo->dict, key_fixed); + if (key_fixed) + key = key_fixed; + value = dict_get (volinfo->dict, key); if (!value) { gf_log ("glusterd", GF_LOG_DEBUG, - "no value set for option %s", key_fixed); + "no value set for option %s", key); goto out; } - _delete_reconfig_opt (volinfo->dict, key_fixed, value, is_force); + _delete_reconfig_opt (volinfo->dict, key, value, is_force); } ret = glusterd_create_volfiles_and_notify_services (volinfo); |