diff options
-rwxr-xr-x | tests/basic/tier/tier.t | 4 | ||||
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-volume-set.c | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/tests/basic/tier/tier.t b/tests/basic/tier/tier.t index a197d6eb127..c7c95690e70 100755 --- a/tests/basic/tier/tier.t +++ b/tests/basic/tier/tier.t @@ -110,6 +110,9 @@ TEST $CLI volume set $V0 cluster.tier-max-mb 1000 TEST $CLI volume set $V0 cluster.tier-max-files 1000 TEST ! $CLI volume set $V0 cluster.tier-max-files -3 TEST ! $CLI volume set $V0 cluster.watermark-low 90 +TEST ! $CLI volume set $V0 cluster.read-freq-threshold -12 +TEST ! $CLI volume set $V0 cluster.write-freq-threshold -12 + # stop the volume and restart it. The rebalance daemon should restart. cd /tmp @@ -128,6 +131,7 @@ 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 $DEMOTE_FREQ TEST $CLI volume set $V0 cluster.tier-promote-frequency $PROMOTE_FREQ TEST $CLI volume set $V0 cluster.read-freq-threshold 0 diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-set.c b/xlators/mgmt/glusterd/src/glusterd-volume-set.c index e4765f6f0d9..f849c313e87 100644 --- a/xlators/mgmt/glusterd/src/glusterd-volume-set.c +++ b/xlators/mgmt/glusterd/src/glusterd-volume-set.c @@ -176,6 +176,7 @@ validate_tier_thresholds (glusterd_volinfo_t *volinfo, if (ret) { snprintf (errstr, sizeof (errstr), "%s is not a compatible " "value. %s expects an integer value.", value, key); + ret = -1; goto out; } @@ -183,6 +184,7 @@ validate_tier_thresholds (glusterd_volinfo_t *volinfo, snprintf (errstr, sizeof (errstr), "%s is not a " "compatible value. %s expects a positive" "integer value.", value, key); + ret = -1; goto out; } |