Revert "ctdb-scripts: Do not "correct" number of nfsd threads when it is 0"
authorMartin Schwenke <martin@meltin.net>
Thu, 4 Apr 2019 07:21:49 +0000 (18:21 +1100)
committerAmitay Isaacs <amitay@samba.org>
Fri, 12 Apr 2019 07:11:30 +0000 (07:11 +0000)
I thought this was being triggered during automated testing.
However, it appears that a poor choice of fixed ports for NFS RPC
services was the real problem.  Revert, since the original behaviour
may be useful.

This reverts commit f1a1c300e192d43f5c9faf9450ffbf16341a2661.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/config/nfs-linux-kernel-callout

index 868f327..def69a0 100755 (executable)
@@ -313,10 +313,8 @@ nfs_check_thread_count ()
 
     # Intentionally not arithmetic comparison - avoids extra errors
     # when above read fails in an unexpected way...
-    if [ "$_running_threads" != "0" ] && \
-              [ "$_running_threads" != "$_configured_threads" ] ; then
-       printf 'Attempting to correct number of nfsd threads from %s to %s\n' \
-              "$_running_threads" "$_configured_threads"
+    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"
     fi
 }