diff options
author | Ravishankar N <ravishankar@redhat.com> | 2017-10-09 17:46:16 +0530 |
---|---|---|
committer | Ravishankar N <ravishankar@redhat.com> | 2017-10-09 17:51:08 +0530 |
commit | 47604fad4c2a3951077e41e0c007ceb979bb2c24 (patch) | |
tree | 4cf022745c771a8e01abeed7ec704c8a68529103 /tests/bugs | |
parent | 5f4aa8c21d10b25aa1322a96d3bca3c7499075eb (diff) | |
download | glusterfs-47604fad4c2a3951077e41e0c007ceb979bb2c24.tar.gz glusterfs-47604fad4c2a3951077e41e0c007ceb979bb2c24.tar.xz glusterfs-47604fad4c2a3951077e41e0c007ceb979bb2c24.zip |
glusterd: fix client io-threads option for replicate volumes
Backport of https://review.gluster.org/#/c/18430/
Problem:
Commit ff075a3d6f9b142911d25c27fd209838782bfff0 disabled loading
client-io-threads for replicate volumes (it was set to on by default in
commit e068c1997314046658dd502e9118dab32decf879) due to performance
issues but in doing so, inadvertently failed to load the xlator even if
the user explicitly enabled the option using the volume set command.
This was despite returning returning sucess for the volume set.
Fix:
Modify the check in perfxl_option_handler() and add checks in volume
create/add-brick/remove-brick code paths, tying it all to
GD_OP_VERSION_3_12_2.
Change-Id: Ib612973a999a7da818cc926f5c2601b1f0794fcf
BUG: 1499158
Signed-off-by: Ravishankar N <ravishankar@redhat.com>
Diffstat (limited to 'tests/bugs')
-rw-r--r-- | tests/bugs/replicate/bug-1498570-client-iot-graph-check.t | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/tests/bugs/replicate/bug-1498570-client-iot-graph-check.t b/tests/bugs/replicate/bug-1498570-client-iot-graph-check.t new file mode 100644 index 0000000000..2b3b304022 --- /dev/null +++ b/tests/bugs/replicate/bug-1498570-client-iot-graph-check.t @@ -0,0 +1,48 @@ +#!/bin/bash +. $(dirname $0)/../../include.rc +. $(dirname $0)/../../volume.rc +. $(dirname $0)/../../afr.rc + +TESTS_EXPECTED_IN_LOOP=21 +function reset_cluster +{ + cleanup + TEST glusterd + TEST pidof glusterd + +} +function check_iot_option +{ + local enabled=$1 + local is_loaded_in_graph=$2 + + EXPECT "$enabled" volume_get_field $V0 client-io-threads + IOT_STRING="volume\ $V0-io-threads" + grep "$IOT_STRING" $GLUSTERD_WORKDIR/vols/$V0/trusted-$V0.tcp-fuse.vol + TEST ret=$? + EXPECT_NOT "$is_loaded_in_graph" echo $ret +} + +reset_cluster +TEST $CLI volume create $V0 $H0:$B0/${V0}{0,1} +check_iot_option on 1 + +reset_cluster +TEST $CLI volume create $V0 replica 2 $H0:$B0/${V0}{0,1} +check_iot_option off 0 + +reset_cluster +TEST $CLI volume create $V0 $H0:$B0/${V0}0 +TEST $CLI volume add-brick $V0 replica 2 $H0:$B0/${V0}1 +check_iot_option off 0 +TEST $CLI volume remove-brick $V0 replica 1 $H0:$B0/${V0}1 force +check_iot_option on 1 + +reset_cluster +TEST $CLI volume create $V0 replica 3 $H0:$B0/${V0}{0..5} +TEST $CLI volume set $V0 client-io-threads on +check_iot_option on 1 +TEST $CLI volume remove-brick $V0 replica 2 $H0:$B0/${V0}2 $H0:$B0/${V0}5 force +check_iot_option on 1 + +cleanup |