|
Packit Service |
e080da |
#!/bin/bash
|
|
Packit Service |
e080da |
|
|
Packit Service |
e080da |
. $(dirname $0)/../include.rc
|
|
Packit Service |
e080da |
. $(dirname $0)/../volume.rc
|
|
Packit Service |
e080da |
. $(dirname $0)/../nfs.rc
|
|
Packit Service |
e080da |
|
|
Packit Service |
e080da |
#G_TESTDEF_TEST_STATUS_CENTOS6=NFS_TEST
|
|
Packit Service |
e080da |
|
|
Packit Service |
e080da |
cleanup;
|
|
Packit Service |
e080da |
|
|
Packit Service |
e080da |
TEST glusterd
|
|
Packit Service |
e080da |
TEST pidof glusterd
|
|
Packit Service |
e080da |
TEST $CLI volume create $V0 replica 3 $H0:$B0/${V0}{0,1,2}
|
|
Packit Service |
e080da |
TEST $CLI volume set $V0 diagnostics.latency-measurement on
|
|
Packit Service |
e080da |
TEST $CLI volume set $V0 diagnostics.count-fop-hits on
|
|
Packit Service |
e080da |
TEST $CLI volume set $V0 diagnostics.stats-dump-interval 1
|
|
Packit Service |
e080da |
TEST $CLI volume set $V0 performance.nfs.io-threads on
|
|
Packit Service |
e080da |
TEST $CLI volume set $V0 nfs.disable off
|
|
Packit Service |
e080da |
TEST $CLI volume start $V0
|
|
Packit Service |
e080da |
EXPECT_WITHIN $NFS_EXPORT_TIMEOUT "1" is_nfs_export_available
|
|
Packit Service |
e080da |
TEST glusterfs --volfile-id=/$V0 --volfile-server=$H0 $M0 --attribute-timeout=0 --entry-timeout=0
|
|
Packit Service |
e080da |
TEST mount_nfs $H0:/$V0 $N0 nolock,soft,intr
|
|
Packit Service |
e080da |
|
|
Packit Service |
e080da |
for i in {1..10};do
|
|
Packit Service |
e080da |
dd if=/dev/zero of=$M0/fuse_testfile$i bs=4k count=100
|
|
Packit Service |
e080da |
done
|
|
Packit Service |
e080da |
|
|
Packit Service |
e080da |
for i in {1..10};do
|
|
Packit Service |
e080da |
dd if=/dev/zero of=$N0/nfs_testfile$i bs=4k count=100
|
|
Packit Service |
e080da |
done
|
|
Packit Service |
e080da |
|
|
Packit Service |
e080da |
# Wait for one dump interval to be done, some seconds past 1 that is the dump
|
|
Packit Service |
e080da |
# interval set
|
|
Packit Service |
e080da |
sleep 2
|
|
Packit Service |
e080da |
|
|
Packit Service |
e080da |
# Change the dump interval to 0, so that when reading the file contents we
|
|
Packit Service |
e080da |
# do not get them truncated by the next interval that is overwriting the latest
|
|
Packit Service |
e080da |
# stats data
|
|
Packit Service |
e080da |
TEST $CLI volume set $V0 diagnostics.stats-dump-interval 0
|
|
Packit Service |
e080da |
|
|
Packit Service |
e080da |
# Verify we have non-zero write counts from the bricks, gNFSd
|
|
Packit Service |
e080da |
# and the FUSE mount.
|
|
Packit Service |
e080da |
TEST [ $(grep 'aggr.fop.write.count' ${GLUSTERD_WORKDIR}/stats/glusterfs_nfsd.dump|tail -1|cut -d: -f2) != "0," ]
|
|
Packit Service |
e080da |
TEST [ $(grep 'aggr.fop.write.count' ${GLUSTERD_WORKDIR}/stats/glusterfs_patchy.dump|tail -1|cut -d: -f2) != "0," ]
|
|
Packit Service |
e080da |
TEST [ $(grep 'aggr.fop.write.count' ${GLUSTERD_WORKDIR}/stats/glusterfsd__d_backends_patchy0.dump|tail -1|cut -d: -f2) != "0," ]
|
|
Packit Service |
e080da |
TEST [ $(grep 'aggr.fop.write.count' ${GLUSTERD_WORKDIR}/stats/glusterfsd__d_backends_patchy1.dump|tail -1|cut -d: -f2) != "0," ]
|
|
Packit Service |
e080da |
TEST [ $(grep 'aggr.fop.write.count' ${GLUSTERD_WORKDIR}/stats/glusterfsd__d_backends_patchy2.dump|tail -1|cut -d: -f2) != "0," ]
|
|
Packit Service |
e080da |
|
|
Packit Service |
e080da |
# Test that io-stats is getting queue sizes from io-threads
|
|
Packit Service |
e080da |
TEST grep '.queue_size' ${GLUSTERD_WORKDIR}/stats/glusterfs_nfsd.dump
|
|
Packit Service |
e080da |
TEST grep '.queue_size' ${GLUSTERD_WORKDIR}/stats/glusterfsd__d_backends_patchy0.dump
|
|
Packit Service |
e080da |
TEST grep '.queue_size' ${GLUSTERD_WORKDIR}/stats/glusterfsd__d_backends_patchy1.dump
|
|
Packit Service |
e080da |
TEST grep '.queue_size' ${GLUSTERD_WORKDIR}/stats/glusterfsd__d_backends_patchy2.dump
|
|
Packit Service |
e080da |
|
|
Packit Service |
e080da |
cleanup;
|