summaryrefslogtreecommitdiff
path: root/ctdb
diff options
context:
space:
mode:
authorMartin Schwenke <martin@meltin.net>2019-03-26 14:15:33 +1100
committerMartin Schwenke <martins@samba.org>2019-03-31 11:47:44 +0000
commitf1a1c300e192d43f5c9faf9450ffbf16341a2661 (patch)
tree1aebe771cf70f166611ea91c975423401f435872 /ctdb
parenta2bd4085896804ee2da811e17f18c78a5bf4e658 (diff)
downloadsamba-f1a1c300e192d43f5c9faf9450ffbf16341a2661.tar.gz
ctdb-scripts: Do not "correct" number of nfsd threads when it is 0
While 0 may indicate that all threads have exited after being stuck, it may also indicate that nfsd should not be running due to being shut down. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13860 Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@samba.org> Autobuild-User(master): Martin Schwenke <martins@samba.org> Autobuild-Date(master): Sun Mar 31 11:47:44 UTC 2019 on sn-devel-144
Diffstat (limited to 'ctdb')
-rwxr-xr-xctdb/config/nfs-linux-kernel-callout6
1 files changed, 4 insertions, 2 deletions
diff --git a/ctdb/config/nfs-linux-kernel-callout b/ctdb/config/nfs-linux-kernel-callout
index def69a04649..868f3279cf2 100755
--- a/ctdb/config/nfs-linux-kernel-callout
+++ b/ctdb/config/nfs-linux-kernel-callout
@@ -313,8 +313,10 @@ nfs_check_thread_count ()
# Intentionally not arithmetic comparison - avoids extra errors
# 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}"
+ 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"
echo "$_configured_threads" >"$_threads_file"
fi
}