summaryrefslogtreecommitdiffstats
path: root/tests/bugs/bug-874272.t
diff options
context:
space:
mode:
authorKaleb S. KEITHLEY <kkeithle@redhat.com>2012-11-12 09:58:02 -0500
committerVijay Bellur <vbellur@redhat.com>2013-07-05 06:31:14 -0700
commit34bca063cd8e7721c876e0f06d42978d5ff4d835 (patch)
tree2cfb6cddec1bbec1f3b7d8b35807a9bd1fa40a75 /tests/bugs/bug-874272.t
parent3521020078e822d74eed235074dc978981fb56ed (diff)
NFS is picking up geo-rep's already open (read-only) file descriptorv3.3.2qa4v3.3.2
Add anonymous member to fd_t and use it instead of over-loading pid for geo-rep and self heal Change-Id: I4d6b29a044a8ed4b8f69ff6e3f35ee227739b2af Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> BUG: 874272 Reviewed-on: http://review.gluster.org/4185 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com> Reviewed-on: http://review.gluster.org/5283
Diffstat (limited to 'tests/bugs/bug-874272.t')
-rwxr-xr-xtests/bugs/bug-874272.t48
1 files changed, 48 insertions, 0 deletions
diff --git a/tests/bugs/bug-874272.t b/tests/bugs/bug-874272.t
new file mode 100755
index 0000000..01793a3
--- /dev/null
+++ b/tests/bugs/bug-874272.t
@@ -0,0 +1,48 @@
+#!/bin/bash
+
+. $(dirname $0)/../include.rc
+
+cleanup;
+
+TEST glusterd
+TEST pidof glusterd
+TEST $CLI volume info;
+
+function volinfo_field()
+{
+ local vol=$1;
+ local field=$2;
+
+ $CLI volume info $vol | grep "^$field: " | sed 's/.*: //';
+}
+
+TEST $CLI volume create $V0 $H0:$B0/brick1;
+EXPECT 'Created' volinfo_field $V0 'Status';
+
+TEST $CLI volume start $V0;
+EXPECT 'Started' volinfo_field $V0 'Status';
+
+## Wait for volume to register with rpc.mountd
+sleep 5;
+
+#mount on a random dir
+TEST MOUNTDIR="/tmp/$RANDOM"
+TEST mkdir $MOUNTDIR
+TEST mount -t nfs -o vers=3,nolock,soft,intr $H0:/$V0 $MOUNTDIR;
+flag=0
+
+TEST touch $MOUNTDIR/testfile
+
+TEST GEOREPDIR="/tmp/$RANDOM"
+TEST mkdir $GEOREPDIR
+
+TEST $CLI volume geo-replication $V0 file:///$GEOREPDIR start
+
+for i in {1..500}; do cat /etc/passwd >> $MOUNTDIR/testfile; if [ $? -ne 0 ]; then flag=1; break; fi; done
+TEST [ $flag -eq 0 ]
+TEST rm -rf $GEOREPDIR
+
+TEST umount $MOUNTDIR
+TEST rm -rf $MOUNTDIR
+
+cleanup;