path: root/tests
diff options
authorAnuradha <>2013-11-25 14:48:23 +0530
committerVijay Bellur <>2013-11-28 08:47:26 -0800
commit3c5529332779ad6cd169370193978ac24974320d (patch)
tree253cc3547cbfc4eb447b72ea7f413603f5fe667e /tests
parent72d3dde33bd12f4aea96d59097bef5df45672610 (diff)
features/index : Creation of indices directory as soon as brick is up.
Missing indices directory in the bricks leads to unwanted log messages. Therefore, indices directory needs to be created as soon as the brick comes up. This patch results in creation of indices/xattrop directory as required. Also includes a testcase to test the same. Change-Id: Ic2aedce00c6c1fb24929ca41f6085aed28709d2c BUG: 1034085 Signed-off-by: Anuradha <> Reviewed-on: Tested-by: Gluster Build System <> Reviewed-by: Pranith Kumar Karampuri <> Reviewed-by: Vijay Bellur <>
Diffstat (limited to 'tests')
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/bugs/bug-1034085.t b/tests/bugs/bug-1034085.t
new file mode 100644
index 000000000..7ccb4403e
--- /dev/null
+++ b/tests/bugs/bug-1034085.t
@@ -0,0 +1,31 @@
+#Test case: Check the creation of indices/xattrop dir as soon as brick comes up.
+. $(dirname $0)/../include.rc
+#Create a volume
+TEST glusterd;
+TEST pidof glusterd
+TEST $CLI volume info;
+TEST $CLI volume create $V0 replica 2 $H0:$B0/${V0}-{0,1};
+EXPECT 'Created' volinfo_field $V0 'Status';
+TEST mkdir -p $B0/${V0}-0/.glusterfs/indices/
+TEST touch $B0/${V0}-0/.glusterfs/indices/xattrop
+#Volume start should not work when xattrop dir not created
+TEST ! $CLI volume start $V0;
+TEST rm $B0/${V0}-0/.glusterfs/indices/xattrop
+#Volume start should work now
+TEST $CLI volume start $V0;
+EXPECT 'Started' volinfo_field $V0 'Status';
+#Check for the existence of indices/xattrop dir
+TEST [ -d $B0/${V0}-0/.glusterfs/indices/xattrop/ ];