Commit 49921ada authored by Jan Safranek's avatar Jan Safranek

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.
parent 6e194c93
......@@ -12,10 +12,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
FROM ubuntu:14.04
FROM centos
MAINTAINER Jan Safranek, jsafrane@redhat.com
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update -qq && apt-get install -y nfs-kernel-server -qq
RUN yum -y install /usr/bin/ps nfs-utils && yum clean all
RUN mkdir -p /exports
ADD run_nfs.sh /usr/local/bin/
ADD index.html /exports/index.html
......
all: push
TAG = 0.2
TAG = 0.3
container:
docker build -t gcr.io/google_containers/volume-nfs . # Build new image and automatically tag it as latest
......
......@@ -31,7 +31,8 @@ function start()
/usr/sbin/rpc.mountd -N 2 -N 3 -V 4 -V 4.1
/usr/sbin/exportfs -r
/usr/sbin/rpc.nfsd -N 2 -N 3 -V 4 -V 4.1 2
# -G 10 to reduce grace time to 10 seconds (the lowest allowed)
/usr/sbin/rpc.nfsd -G 10 -N 2 -N 3 -V 4 -V 4.1 2
echo "NFS started"
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment