diff --git a/images/nfs-ganesha/entrypoint.sh b/images/nfs-ganesha/entrypoint.sh index b68b33d..b0ef27f 100755 --- a/images/nfs-ganesha/entrypoint.sh +++ b/images/nfs-ganesha/entrypoint.sh @@ -23,7 +23,7 @@ DBUS_DAEMON_UP=0 for i in `seq 1 $TIMEOUT`; do echo "Waiting for rpcbind to be up ($i/$TIMEOUT)..." set +e - /usr/sbin/rpcinfo -T tcp 127.0.0.1 100000 4 + ( ulimit -n 1024 && exec /usr/sbin/rpcinfo -T tcp 127.0.0.1 100000 4 ) result=$? set -e @@ -44,7 +44,7 @@ fi for i in `seq 1 $TIMEOUT`; do echo "Waiting for rpc.statd to be up ($i/$TIMEOUT)..." set +e - /usr/sbin/rpcinfo -T tcp 127.0.0.1 100024 1 + ( ulimit -n 1024 && exec /usr/sbin/rpcinfo -T tcp 127.0.0.1 100024 1 ) result=$? set -e diff --git a/images/nfs-ganesha/healthcheck.sh b/images/nfs-ganesha/healthcheck.sh index a2255f3..708a100 100755 --- a/images/nfs-ganesha/healthcheck.sh +++ b/images/nfs-ganesha/healthcheck.sh @@ -7,6 +7,8 @@ HOST=127.0.0.1 PROGRAM=100003 VERSION=4 +ulimit -n 1024 + exec /usr/bin/timeout \ --kill-after=1s \ 8s \ diff --git a/images/rpc.statd/entrypoint.sh b/images/rpc.statd/entrypoint.sh index 8aac787..9bac2a0 100755 --- a/images/rpc.statd/entrypoint.sh +++ b/images/rpc.statd/entrypoint.sh @@ -24,12 +24,13 @@ TIMEOUT=10 for i in `seq 1 $TIMEOUT`; do echo "Waiting for rpcbind to be up ($i/$TIMEOUT)..." set +e - /usr/bin/rpcinfo -T tcp 127.0.0.1 100000 4 + ( ulimit -n 1024 && exec /usr/bin/rpcinfo -T tcp 127.0.0.1 100000 4 ) result=$? set -e if [ $result -eq 0 ]; then echo "rpcbind listening, starting rpc.statd" + ulimit -n 1024 exec /usr/sbin/rpc.statd --no-syslog --foreground --state-directory-path ${STATD_LIBDIR} ${PORT_ARG} "$@" fi diff --git a/images/rpc.statd/healthcheck.sh b/images/rpc.statd/healthcheck.sh index 23adaec..ca870e0 100755 --- a/images/rpc.statd/healthcheck.sh +++ b/images/rpc.statd/healthcheck.sh @@ -7,6 +7,8 @@ HOST=127.0.0.1 PROGRAM=100024 VERSION=1 +ulimit -n 1024 + exec /usr/bin/timeout \ --kill-after=1s \ 8s \ diff --git a/images/rpcbind/entrypoint.sh b/images/rpcbind/entrypoint.sh index b75feb4..ee5f70d 100755 --- a/images/rpcbind/entrypoint.sh +++ b/images/rpcbind/entrypoint.sh @@ -3,5 +3,6 @@ set -xue -o pipefail /usr/bin/systemd-tmpfiles --create /usr/lib/tmpfiles.d/rpcbind.conf +ulimit -n 1024 exec /usr/bin/rpcbind "$@" -w -f diff --git a/images/rpcbind/healthcheck.sh b/images/rpcbind/healthcheck.sh index ae5b820..77f59a1 100755 --- a/images/rpcbind/healthcheck.sh +++ b/images/rpcbind/healthcheck.sh @@ -7,6 +7,8 @@ HOST=127.0.0.1 PROGRAM=100000 VERSION=4 +ulimit -n 1024 + exec /usr/bin/timeout \ --kill-after=1s \ 8s \