summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-op-sm.c
diff options
context:
space:
mode:
authorRavishankar N <ravishankar@redhat.com>2018-02-14 12:15:53 +0530
committerAtin Mukherjee <amukherj@redhat.com>2018-03-07 04:48:09 +0000
commitbd2c45fe3180fe36b042d5eabd348b6eaeb8d3e2 (patch)
tree654acff37c5ff9f38b03f3e8b4e9e3e2c5c357c9 /xlators/mgmt/glusterd/src/glusterd-op-sm.c
parent685d4409f9405a527c87b41d1d89f798729d30f4 (diff)
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 <ravishankar@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-op-sm.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-op-sm.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
index 1cd41b0e9bd..ec55082d3d1 100644
--- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c
+++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
@@ -2514,6 +2514,15 @@ out:
return ret;
}
+/* This is a hack to prevent client-io-threads from being loaded in the graph
+ * when the cluster-op-version is bumped up from 3.8.x to 3.13.x. The key is
+ * deleted subsequently in glusterd_create_volfiles(). */
+static int
+glusterd_dict_set_skip_cliot_key (glusterd_volinfo_t *volinfo)
+{
+ return dict_set_int32 (volinfo->dict, "skip-CLIOT", 1);
+}
+
static int
glusterd_op_set_all_volume_options (xlator_t *this, dict_t *dict,
char **op_errstr)
@@ -2603,6 +2612,10 @@ glusterd_op_set_all_volume_options (xlator_t *this, dict_t *dict,
ret = glusterd_update_volumes_dict (volinfo);
if (ret)
goto out;
+
+ if (glusterd_dict_set_skip_cliot_key (volinfo))
+ goto out;
+
if (!volinfo->is_snap_volume) {
svc = &(volinfo->snapd.svc);
ret = svc->manager (svc, volinfo,