Skip to content

Commit 49921ad

Browse files
committed
Configure lower NFS grace period.
From RFC 3530: During the grace period, the server must reject READ and WRITE operations and non-reclaim locking requests (i.e., other LOCK and OPEN operations) with an error of NFS4ERR_GRACE. That basically means that all open() calls from clients are blocked until the grace period is over (90 seconds by default). We want the grace period as low as possible to speed up the tests. '10' seconds were tested on Fedora 21 and Ubuntu 15.04 as the hosts. The test image is rebased to Fedora in order to get 'rpc.nfsd -G <n>' option, Ubuntu does not support it.
1 parent 6e194c9 commit 49921ad

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

test/images/volumes-tester/nfs/Dockerfile

+2-3
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,9 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
FROM ubuntu:14.04
15+
FROM centos
1616
MAINTAINER Jan Safranek, [email protected]
17-
ENV DEBIAN_FRONTEND noninteractive
18-
RUN apt-get update -qq && apt-get install -y nfs-kernel-server -qq
17+
RUN yum -y install /usr/bin/ps nfs-utils && yum clean all
1918
RUN mkdir -p /exports
2019
ADD run_nfs.sh /usr/local/bin/
2120
ADD index.html /exports/index.html

test/images/volumes-tester/nfs/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
all: push
22

3-
TAG = 0.2
3+
TAG = 0.3
44

55
container:
66
docker build -t gcr.io/google_containers/volume-nfs . # Build new image and automatically tag it as latest

test/images/volumes-tester/nfs/run_nfs.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ function start()
3131
/usr/sbin/rpc.mountd -N 2 -N 3 -V 4 -V 4.1
3232

3333
/usr/sbin/exportfs -r
34-
/usr/sbin/rpc.nfsd -N 2 -N 3 -V 4 -V 4.1 2
34+
# -G 10 to reduce grace time to 10 seconds (the lowest allowed)
35+
/usr/sbin/rpc.nfsd -G 10 -N 2 -N 3 -V 4 -V 4.1 2
3536

3637
echo "NFS started"
3738
}

0 commit comments

Comments
 (0)