summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorKaleb S. KEITHLEY <kkeithle@redhat.com>2012-11-12 09:58:02 -0500
committerVijay Bellur <vbellur@redhat.com>2012-11-14 05:37:02 -0800
commit4e1c921636dbe3c8ec083a29a2508c6092ba8641 (patch)
tree48235e2b5f7634b93af644d8c2827ccba1a74933 /tests
parent1c4cb5237701bb138f9cce29036773086253f839 (diff)
NFS is picking up geo-rep's already open (read-only) file descriptor
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>
Diffstat (limited to 'tests')
-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 00000000000..01793a36873
--- /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;