1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

ctdb-scripts: Use nfsconf as a last resort get nfsd thread count

If nfsconf exists then use it as last resort to attempt to extract
[nfsd]:threads from /etc/nfs.conf.

Invocation of nfsconf requires "|| true" because this script uses "set
-e".  Add a stub that always fails to at least test this much.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14444
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>

Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Mon Jul 27 07:06:58 UTC 2020 on sn-devel-184
This commit is contained in:
Martin Schwenke 2020-07-20 12:02:45 +10:00 committed by Amitay Isaacs
parent 334dd8cedd
commit 642dc6ded6
2 changed files with 8 additions and 0 deletions

View File

@ -299,6 +299,9 @@ nfs_check_thread_count ()
# assume that those using the default don't care about the number
# of threads and that they have switched on this feature in error.
_configured_threads="${RPCNFSDCOUNT:-${USE_KERNEL_NFSD_NUMBER}}"
if [ -z "$_configured_threads" ] && type nfsconf >/dev/null 2>&1 ; then
_configured_threads=$(nfsconf --get nfsd threads) || true
fi
[ -n "$_configured_threads" ] || return 0
_threads_file="${PROCFS_PATH}/fs/nfsd/threads"

View File

@ -0,0 +1,5 @@
#!/bin/sh
# This always fails for now, since there are no tests that expect to
# use it.
exit 1