From bd2c45fe3180fe36b042d5eabd348b6eaeb8d3e2 Mon Sep 17 00:00:00 2001 From: Ravishankar N Date: Wed, 14 Feb 2018 12:15:53 +0530 Subject: glusterd: volume get fixes for client-io-threads & quorum-type 1. If a replica volume created on glusterfs-3.8 was upgraded to glusterfs-3.12, `gluster vol get volname client-io-threads` displayed 'on' even though it wasn't and the xlator wasn't loaded on the client-graph. This was due to removing certain checks in glusterd_get_default_val_for_volopt as a part of commit 47604fad4c2a3951077e41e0c007ceb979bb2c24. Fix it. 2. Also, as a part of op-version bump-up, client-io-threads was being loaded on the clients during volfile regeneration. Prevent it. 3. AFR assumes quorum-type to be auto in newly created replic 3 (odd replica in general) volumes but `gluster vol get quorum-type` displays 'none'. Fix it. Change-Id: I19e586361ed1065c70fb378533d3b4dac1095df9 BUG: 1545056 Signed-off-by: Ravishankar N --- xlators/mgmt/glusterd/src/glusterd-volgen.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'xlators/mgmt/glusterd/src/glusterd-volgen.c') diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c index f9fcf88a256..caf421165f8 100644 --- a/xlators/mgmt/glusterd/src/glusterd-volgen.c +++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c @@ -59,7 +59,6 @@ extern struct volopt_map_entry glusterd_volopt_map[]; } \ } while (0 /* CONSTCOND */) - static int volgen_graph_build_clients (volgen_graph_t *graph, glusterd_volinfo_t *volinfo, dict_t *set_dict, void *param); @@ -524,6 +523,11 @@ volgen_graph_set_options_generic (volgen_graph_t *graph, dict_t *dict, odt.data_t_fake = _gf_false; data = dict_get (dict, vme->key); + if (!strcmp (vme->key, "performance.client-io-threads") && + dict_get_str_boolean (dict, "skip-CLIOT", + _gf_false) == _gf_true) { + continue; + } if (data) process_option (vme->key, data, &odt); @@ -6672,11 +6676,13 @@ glusterd_create_volfiles (glusterd_volinfo_t *volinfo) "Could not generate client volfiles"); - ret = glusterd_generate_gfproxyd_volfile (volinfo); + ret = glusterd_generate_gfproxyd_volfile (volinfo); if (ret) gf_log (this->name, GF_LOG_ERROR, "Could not generate gfproxy volfiles"); + dict_del (volinfo->dict, "skip-CLIOT"); + out: return ret; } -- cgit