summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xdvm/2584/testcase2
-rwxr-xr-xdvm/2628/testcase2
-rwxr-xr-x[-rw-r--r--]dvm/764785/testcase0
-rwxr-xr-xdvm/765453/testcase76
4 files changed, 78 insertions, 2 deletions
diff --git a/dvm/2584/testcase b/dvm/2584/testcase
index e3dc605..0a2b08e 100755
--- a/dvm/2584/testcase
+++ b/dvm/2584/testcase
@@ -2,7 +2,7 @@
source $cwd/regression_helpers
-$GLUSTERFSDIR/gluster volume create $global_bug_id replica 2 $(hostname):$EXPORT_DIR/$global_bug_id/brick1 $(hostname):$EXPORT_DIR/$global_bug_id/brick2 $(hostname):$EXPORT_DIR/$global_bug_id/brick3 $(hostname):$EXPORT_DIR/$global_bug_id/brick4 2>/dev/null 1>/dev/null;
+$GLUSTERFSDIR/gluster volume create --mode=script $global_bug_id replica 2 $(hostname):$EXPORT_DIR/$global_bug_id/brick1 $(hostname):$EXPORT_DIR/$global_bug_id/brick2 $(hostname):$EXPORT_DIR/$global_bug_id/brick3 $(hostname):$EXPORT_DIR/$global_bug_id/brick4 2>/dev/null 1>/dev/null;
$GLUSTERFSDIR/gluster volume start $global_bug_id 2>/dev/null 1>/dev/null;
diff --git a/dvm/2628/testcase b/dvm/2628/testcase
index 800fa1a..89e9abc 100755
--- a/dvm/2628/testcase
+++ b/dvm/2628/testcase
@@ -2,7 +2,7 @@
source $cwd/regression_helpers
-$GLUSTERFSDIR/gluster volume create $global_bug_id replica 2 $(hostname):$EXPORT_DIR/$global_bug_id/brick1 $(hostname):$EXPORT_DIR/$global_bug_id/brick2 2>/dev/null 1>/dev/null;
+$GLUSTERFSDIR/gluster volume create --mode=script $global_bug_id replica 2 $(hostname):$EXPORT_DIR/$global_bug_id/brick1 $(hostname):$EXPORT_DIR/$global_bug_id/brick2 2>/dev/null 1>/dev/null;
$GLUSTERFSDIR/gluster volume start $global_bug_id 2>/dev/null 1>/dev/null;
diff --git a/dvm/764785/testcase b/dvm/764785/testcase
index 513d5ba..513d5ba 100644..100755
--- a/dvm/764785/testcase
+++ b/dvm/764785/testcase
diff --git a/dvm/765453/testcase b/dvm/765453/testcase
new file mode 100755
index 0000000..3a9792c
--- /dev/null
+++ b/dvm/765453/testcase
@@ -0,0 +1,76 @@
+#!/bin/bash
+
+source $cwd/regression_helpers
+
+
+
+ATTR=trusted.glusterfs.testattr
+VAL="thisistestattrib"
+START="start"
+STATUS="status"
+
+$GLUSTERFSDIR/gluster volume create $global_bug_id $(hostname):$EXPORT_DIR/$global_bug_id/brick1\
+ $(hostname):$EXPORT_DIR/$global_bug_id/brick2 2>/dev/null 1>/dev/null
+
+ret=$?
+
+if [ $ret -ne 0 ]; then
+ exit 1
+fi
+
+
+$GLUSTERFSDIR/gluster volume start $global_bug_id 2>/dev/null 1>/dev/null;
+sleep 5;
+
+ret=$?
+if [ $ret -ne 0 ]; then
+ exit 1
+fi
+
+
+
+mount_glusterfs $global_bug_id;
+
+for i in {1..10}
+do
+ touch $FUSE_MOUNT/$i
+ setfattr -n $ATTR -v $VAL $FUSE_MOUNT/$i 2>/dev/null 1>/dev/null
+done
+
+#add a new brick to the volume
+$GLUSTERFSDIR/gluster volume add-brick $global_bug_id $(hostname):$EXPORT_DIR/$global_bug_id/brick3\
+ $(hostname):$EXPORT_DIR/$global_bug_id/brick4 2>/dev/null 1>/dev/null
+
+#Initiate rebalance
+
+$GLUSTERFSDIR/gluster volume rebalance $global_bug_id $START 2>/dev/null 1>/dev/null
+
+status=0
+
+time_out=0
+while [[ $status -ne 1 && $time_out -le 300 ]]
+do
+ status=$($GLUSTERFSDIR/gluster volume rebalance $global_bug_id status| grep 'rebalance completed'|wc -l);
+ time_out=$(( $time_out + 1))
+ sleep 1;
+done
+
+# for some reason rebalance is hung so we errout
+# assuming 300 is fairly enough for rebalancing
+# 10 files
+if [ $time_out -gt 300 ]; then
+ exit 1
+fi
+
+#check whether xattrs are preserved after rebalance
+
+for i in {1..10}
+do
+ getfattr -d -e text -n $ATTR -m . $FUSE_MOUNT/$i 2>/dev/null | grep "$VAL" 2>/dev/null 1>/dev/null
+ ret=$?
+ if [ $ret -ne 0 ]; then
+ exit 1
+ fi
+done
+
+exit 0