summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorVenkatesh Somyajulu <vsomyaju@redhat.com>2012-11-17 01:36:13 +0530
committerVijay Bellur <vbellur@redhat.com>2012-11-20 00:45:59 -0800
commit961bc80c7aeedaa0bdc580f9f08d1c8a2a0992cd (patch)
tree7fe6f4037fce018ea7a455b0c8a021808abedab1 /tests
parent65cc8cb531456de934e8ba3175430e8fcb304ca5 (diff)
posix: Fix volume will not start if brick has no volume-id attribute
Problem: If the extended attribute (trusted.glusterfs.volume-id) of a brick is absent and <gluster volume start volume-name> command is executed then curretly volume-id from the volume file will be set as an extended attribute of the brick and volume will get started. But if setup is such that brick is used as a mount point and before executing the <gluster volume start volume-name> command, nothing is mounted on the brick then all the file operations will take place at the brick but actual intention of the brick is to be used as mount point only. FIX: Do not start the volume if extended attribute (trusted.glusterfs.volume-id) is set absent. Change-Id: Id2462d87d6087e97e0b8831512fdbc3595f7078b BUG: 860297 Signed-off-by: Venkatesh Somyajulu <vsomyaju@redhat.com> Reviewed-on: http://review.gluster.org/4202 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/bugs/bug-860297.t13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/bugs/bug-860297.t b/tests/bugs/bug-860297.t
new file mode 100644
index 00000000000..2a3ca7a7a6c
--- /dev/null
+++ b/tests/bugs/bug-860297.t
@@ -0,0 +1,13 @@
+#!/bin/bash
+. $(dirname $0)/../include.rc
+cleanup;
+
+TEST glusterd
+TEST pidof glusterd
+TEST $CLI volume info
+TEST $CLI volume create $V0 $H0:$B0/brick1
+setfattr -x trusted.glusterfs.volume-id $B0/brick1
+## If Extended attribute trusted.glusterfs.volume-id is not present
+## then volume should not be able to start
+TEST ! $CLI volume start $V0;
+cleanup;