summaryrefslogtreecommitdiffstats
path: root/tests/basic
diff options
context:
space:
mode:
authorKaleb S KEITHLEY <kkeithle@redhat.com>2016-03-15 06:16:31 -0400
committerNiels de Vos <ndevos@redhat.com>2016-04-27 00:59:30 -0700
commita4f84d786b596387aa0d659fb5cc8a933c95c01b (patch)
tree85e0f319cf0405a632c5a268dfb25407c054dba8 /tests/basic
parent3c35329feb4dd479c9e4856ee27fa4b12c708db2 (diff)
glusterd: default value of nfs.disable, change from false to true
Next step in eventual deprecation of glusterfs nfs server in favor of ganesha.nfsd. Also replace several open-coded strings with constant. Change-Id: If52f5e880191a14fd38e69b70a32b0300dd93a50 BUG: 1092414 Signed-off-by: Kaleb S KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/13738 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Tested-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
Diffstat (limited to 'tests/basic')
-rw-r--r--tests/basic/afr/arbiter-mount.t1
-rwxr-xr-xtests/basic/ec/nfs.t1
-rwxr-xr-xtests/basic/mount-nfs-auth.t13
-rwxr-xr-xtests/basic/mount.t1
-rw-r--r--tests/basic/nufa.t1
-rwxr-xr-xtests/basic/quota-anon-fd-nfs.t1
-rwxr-xr-xtests/basic/quota-nfs.t1
-rwxr-xr-xtests/basic/quota.t1
-rw-r--r--tests/basic/stats-dump.t2
-rw-r--r--tests/basic/uss.t2
-rw-r--r--tests/basic/volume-status.t1
11 files changed, 21 insertions, 4 deletions
diff --git a/tests/basic/afr/arbiter-mount.t b/tests/basic/afr/arbiter-mount.t
index 7276285202f..587e808863f 100644
--- a/tests/basic/afr/arbiter-mount.t
+++ b/tests/basic/afr/arbiter-mount.t
@@ -12,6 +12,7 @@ TEST glusterd;
TEST pidof glusterd
TEST $CLI volume create $V0 replica 3 arbiter 1 $H0:$B0/${V0}{0,1,2}
+TEST $CLI volume set $V0 nfs.disable false
TEST $CLI volume start $V0
EXPECT 'Started' volinfo_field $V0 'Status'
EXPECT_WITHIN $NFS_EXPORT_TIMEOUT "1" is_nfs_export_available;
diff --git a/tests/basic/ec/nfs.t b/tests/basic/ec/nfs.t
index 16e88c1460b..f0bdff93d5f 100755
--- a/tests/basic/ec/nfs.t
+++ b/tests/basic/ec/nfs.t
@@ -9,6 +9,7 @@ TEST glusterd
TEST pidof glusterd
TEST $CLI volume create $V0 redundancy 2 $H0:$B0/${V0}{0..5}
EXPECT "Created" volinfo_field $V0 'Status'
+TEST $CLI volume set $V0 nfs.disable false
TEST $CLI volume start $V0
EXPECT_WITHIN $PROCESS_UP_TIMEOUT "Started" volinfo_field $V0 'Status'
diff --git a/tests/basic/mount-nfs-auth.t b/tests/basic/mount-nfs-auth.t
index 6ecac5b469a..9df5cb45c3b 100755
--- a/tests/basic/mount-nfs-auth.t
+++ b/tests/basic/mount-nfs-auth.t
@@ -132,9 +132,16 @@ function stat_nfs () {
# Restarts the NFS server
function restart_nfs () {
- # disabling nfs acces for a volume requires a restart
- $CLI volume set patchy nfs.disable true
- $CLI volume reset patchy nfs.disable
+ local NFS_PID=$(cat ${GLUSTERD_WORKDIR}/nfs/run/nfs.pid)
+
+ # kill the NFS-server if it is running
+ while ps -q ${NFS_PID} 2>&1 > /dev/null; do
+ kill ${NFS_PID}
+ sleep 0.5
+ done
+
+ # start-force starts the NFS-server again
+ $CLI vol start patchy force
}
setup_cluster
diff --git a/tests/basic/mount.t b/tests/basic/mount.t
index 47d0efe3908..52e760d048d 100755
--- a/tests/basic/mount.t
+++ b/tests/basic/mount.t
@@ -12,6 +12,7 @@ TEST pidof glusterd
TEST $CLI volume info;
TEST $CLI volume create $V0 replica 2 stripe 2 $H0:$B0/${V0}{1,2,3,4,5,6,7,8};
+TEST $CLI volume set $V0 nfs.disable false
function volinfo_field()
{
diff --git a/tests/basic/nufa.t b/tests/basic/nufa.t
index ca4054a354d..1d74d376b7d 100644
--- a/tests/basic/nufa.t
+++ b/tests/basic/nufa.t
@@ -11,6 +11,7 @@ TEST pidof glusterd
TEST $CLI volume info;
TEST $CLI volume create $V0 replica 2 stripe 2 $H0:$B0/${V0}{1,2,3,4,5,6,7,8};
+TEST $CLI volume set $V0 nfs.disable false
EXPECT "$V0" volinfo_field $V0 'Volume Name';
EXPECT 'Created' volinfo_field $V0 'Status';
diff --git a/tests/basic/quota-anon-fd-nfs.t b/tests/basic/quota-anon-fd-nfs.t
index e2cce0b69c2..c6b01553b02 100755
--- a/tests/basic/quota-anon-fd-nfs.t
+++ b/tests/basic/quota-anon-fd-nfs.t
@@ -18,6 +18,7 @@ TEST $CLI volume info;
TEST $CLI volume create $V0 $H0:$B0/brick1;
EXPECT 'Created' volinfo_field $V0 'Status';
+TEST $CLI volume set $V0 nfs.disable false
# The test makes use of inode-lru-limit to hit a scenario, where we
diff --git a/tests/basic/quota-nfs.t b/tests/basic/quota-nfs.t
index 16d5aa6a90c..74fde400bd1 100755
--- a/tests/basic/quota-nfs.t
+++ b/tests/basic/quota-nfs.t
@@ -15,6 +15,7 @@ TEST $CLI volume info;
TEST $CLI volume create $V0 $H0:$B0/brick1;
EXPECT 'Created' volinfo_field $V0 'Status';
+TEST $CLI volume set $V0 nfs.disable false
TEST $CLI volume set $V0 network.inode-lru-limit 1
TEST $CLI volume set $V0 performance.nfs.write-behind off
diff --git a/tests/basic/quota.t b/tests/basic/quota.t
index 887fbfc32bc..5a03fa25683 100755
--- a/tests/basic/quota.t
+++ b/tests/basic/quota.t
@@ -24,6 +24,7 @@ EXPECT "$V0" volinfo_field $V0 'Volume Name';
EXPECT 'Created' volinfo_field $V0 'Status';
EXPECT '4' brick_count $V0
+TEST $CLI volume set $V0 nfs.disable false
TEST $CLI volume start $V0;
EXPECT 'Started' volinfo_field $V0 'Status';
diff --git a/tests/basic/stats-dump.t b/tests/basic/stats-dump.t
index 0a680e44e55..7da6e0605a4 100644
--- a/tests/basic/stats-dump.t
+++ b/tests/basic/stats-dump.t
@@ -14,7 +14,7 @@ TEST $CLI volume set $V0 diagnostics.count-fop-hits on
TEST $CLI volume set $V0 diagnostics.stats-dump-interval 1
TEST $CLI volume set $V0 nfs.disable off
TEST $CLI volume start $V0
-sleep 1
+EXPECT_WITHIN $NFS_EXPORT_TIMEOUT "1" is_nfs_export_available
TEST glusterfs --volfile-id=/$V0 --volfile-server=$H0 $M0 --attribute-timeout=0 --entry-timeout=0
TEST mount_nfs $H0:/$V0 $N0 nolock,soft,intr
diff --git a/tests/basic/uss.t b/tests/basic/uss.t
index 55fab660aa2..6cfc0303895 100644
--- a/tests/basic/uss.t
+++ b/tests/basic/uss.t
@@ -34,6 +34,8 @@ TEST glusterd;
TEST pidof glusterd;
TEST $CLI volume create $V0 $H0:$L1 $H0:$L2 $H0:$L3;
+TEST $CLI volume set $V0 nfs.disable false
+
TEST $CLI volume start $V0;
diff --git a/tests/basic/volume-status.t b/tests/basic/volume-status.t
index 7d1b8326e3c..f87b0a93edf 100644
--- a/tests/basic/volume-status.t
+++ b/tests/basic/volume-status.t
@@ -11,6 +11,7 @@ TEST pidof glusterd
TEST $CLI volume info;
TEST $CLI volume create $V0 replica 2 stripe 2 $H0:$B0/${V0}{1,2,3,4,5,6,7,8};
+TEST $CLI volume set $V0 nfs.disable false
TEST $CLI volume start $V0;