diff options
author | Mohammed Rafi KC <rkavunga@redhat.com> | 2015-05-11 14:43:23 +0530 |
---|---|---|
committer | Krishnan Parthasarathi <kparthas@redhat.com> | 2015-06-10 01:08:47 -0700 |
commit | f6a062044a3447bea5bf0fcf21a3f85c00fb6c7d (patch) | |
tree | 3d45bbfccdca4e9189131b2609730a5b628029ee /tests/basic/tier/tier.t | |
parent | d835219a30327ede60e4ef28210914ab30bd0712 (diff) |
tier/volume set: Validate volume set option for tier
Volume set option related to tier volume can only be set
for tier volume, also currently all volume set i for tier
option accepts a non-negative integer. This patch validate
both condition.
Change-Id: I3611af048ff4ab193544058cace8db205ea92336
BUG: 1216960
Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
Signed-off-by: Dan Lambright <dlambrig@redhat.com>
Reviewed-on: http://review.gluster.org/10751
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Joseph Fernandes
Diffstat (limited to 'tests/basic/tier/tier.t')
-rwxr-xr-x | tests/basic/tier/tier.t | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/tests/basic/tier/tier.t b/tests/basic/tier/tier.t index 851d8b66dad..3c01fb386ea 100755 --- a/tests/basic/tier/tier.t +++ b/tests/basic/tier/tier.t @@ -52,8 +52,6 @@ function confirm_vol_stopped { fi } -LAST_BRICK=1 -CACHE_BRICK=2 DEMOTE_TIMEOUT=12 PROMOTE_TIMEOUT=5 MIGRATION_TIMEOUT=10 @@ -67,16 +65,27 @@ TEST $CLI volume create $V0 replica 2 $H0:$B0/${V0}{0..$LAST_BRICK} TEST ! $CLI volume attach-tier $V0 replica 5 $H0:$B0/${V0}$CACHE_BRICK_FIRST $H0:$B0/${V0}$CACHE_BRICK_LAST TEST $CLI volume start $V0 -TEST $CLI volume set $V0 cluster.tier-demote-frequency 4 -TEST $CLI volume set $V0 cluster.tier-promote-frequency 4 -TEST $CLI volume set $V0 cluster.read-freq-threshold 0 -TEST $CLI volume set $V0 cluster.write-freq-threshold 0 + TEST $CLI volume set $V0 performance.quick-read off TEST $CLI volume set $V0 performance.io-cache off TEST $CLI volume set $V0 features.ctr-enabled on +#Not a tier volume +TEST ! $CLI volume set $V0 cluster.tier-demote-frequency 4 + TEST $CLI volume attach-tier $V0 replica 2 $H0:$B0/${V0}$CACHE_BRICK_FIRST $H0:$B0/${V0}$CACHE_BRICK_LAST +#Tier options expect non-negative value +TEST ! $CLI volume set $V0 cluster.tier-promote-frequency -1 + +#Tier options expect non-negative value +TEST ! $CLI volume set $V0 cluster.read-freq-threshold qwerty + +TEST $CLI volume set $V0 cluster.tier-demote-frequency 4 +TEST $CLI volume set $V0 cluster.tier-promote-frequency 4 +TEST $CLI volume set $V0 cluster.read-freq-threshold 0 +TEST $CLI volume set $V0 cluster.write-freq-threshold 0 + TEST $GFS --volfile-id=/$V0 --volfile-server=$H0 $M0; # Basic operations. |