This currently causes monitor failure.
Log a warning instead. If there is a transient issue, such as NFS
being restarted in the background, then the thread count file should
be there the next time around so the count can be adjusted if
necessary.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
# nfsd should be running the configured number of threads. If
# there are a different number of threads then tell nfsd the
# correct number.
- read _running_threads <"$_threads_file"
+ read _running_threads <"$_threads_file" || {
+ echo "WARNING: Reading \"${_threads_file}\" unexpectedly failed"
+ exit 0
+ }
+
# Intentionally not arithmetic comparison - avoids extra errors
- # when above fails...
+ # when above read fails in an unexpected way...
if [ "$_running_threads" != "$_configured_threads" ] ; then
echo "Attempting to correct number of nfsd threads from ${_running_threads} to ${_configured_threads}"
echo "$_configured_threads" >"$_threads_file"