summaryrefslogtreecommitdiffstats
path: root/tests/bugs/glusterd
diff options
context:
space:
mode:
authorAtin Mukherjee <amukherj@redhat.com>2017-08-17 10:54:02 +0530
committerAtin Mukherjee <amukherj@redhat.com>2017-08-18 06:36:34 +0000
commit01abf7ee37702407403afcf9aa6c9019a0316e1d (patch)
tree8e5f4da2d9a3707a126812cbdba5dc10fef7a31c /tests/bugs/glusterd
parent3998c28324c8907b9b3ade75c98a6a0e4591f23b (diff)
glusterd: disallow volume specific options to be set with all as volume name
All the .validate_fn defined in volume map entry table refers to volinfo object. And if we end up in trying to set a volume level option cluster wide glusterd results into a crash. Change-Id: I7c877aee0ff5c8c1d8c95662fdc8c8923355ae7b BUG: 1482344 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: https://review.gluster.org/18052 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Prashanth Pai <ppai@redhat.com> Reviewed-by: mohammed rafi kc <rkavunga@redhat.com> Reviewed-by: Gaurav Yadav <gyadav@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Diffstat (limited to 'tests/bugs/glusterd')
-rw-r--r--tests/bugs/glusterd/bug-1482344-volume-option-set-cluster-level.t25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/bugs/glusterd/bug-1482344-volume-option-set-cluster-level.t b/tests/bugs/glusterd/bug-1482344-volume-option-set-cluster-level.t
new file mode 100644
index 00000000000..481dee186b8
--- /dev/null
+++ b/tests/bugs/glusterd/bug-1482344-volume-option-set-cluster-level.t
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+#Test case: glusterd should disallow a volume level option to be set cluster
+wide and glusterd should not crash
+
+. $(dirname $0)/../../include.rc
+. $(dirname $0)/../../volume.rc
+
+cleanup;
+
+#Basic checks
+TEST glusterd
+TEST pidof glusterd
+
+#Create a 2x1 distributed volume
+TEST $CLI volume create $V0 $H0:$B0/${V0}{1,2};
+TEST $CLI volume start $V0
+
+TEST ! $CLI volume set all transport.listen-backlog 128
+
+# Check the volume info output, if glusterd would have crashed then this command
+# will fail
+TEST $CLI volume info $V0;
+
+cleanup;