From 41c5af4fcd06514c5c3ffe651e934691e53f870a Mon Sep 17 00:00:00 2001 From: Frank Brehm Date: Fri, 12 Nov 2021 00:40:02 +0100 Subject: [PATCH] committing changes in /etc made by "/usr/bin/apt full-upgrade -y" Package changes: -ctdb 2:4.11.6+dfsg-0ubuntu1.10 amd64 +ctdb 2:4.13.14+dfsg-0ubuntu0.20.04.1 amd64 -libasound2 1.2.2-2.1ubuntu2.4 amd64 -libasound2-data 1.2.2-2.1ubuntu2.4 all +libasound2 1.2.2-2.1ubuntu2.5 amd64 +libasound2-data 1.2.2-2.1ubuntu2.5 all -libatopology2 1.2.2-2.1ubuntu2.4 amd64 +libatopology2 1.2.2-2.1ubuntu2.5 amd64 -libldb2 2:2.0.10-0ubuntu0.20.04.3 amd64 +libldb2 2:2.2.3-0ubuntu0.20.04.2 amd64 -libpq5 12.8-0ubuntu0.20.04.1 amd64 +libpq5 12.9-0ubuntu0.20.04.1 amd64 -libsmbclient 2:4.11.6+dfsg-0ubuntu1.10 amd64 +libsmbclient 2:4.13.14+dfsg-0ubuntu0.20.04.1 amd64 -libtalloc2 2.3.0-3ubuntu1 amd64 +libtalloc2 2.3.1-0ubuntu0.20.04.1 amd64 -libtdb1 1.4.2-3build1 amd64 +libtdb1 1.4.3-0ubuntu0.20.04.1 amd64 -libtevent0 0.10.1-4 amd64 +libtevent0 0.10.2-0ubuntu0.20.04.1 amd64 -libwbclient0 2:4.11.6+dfsg-0ubuntu1.10 amd64 +libwbclient0 2:4.13.14+dfsg-0ubuntu0.20.04.1 amd64 -postgresql-client-12 12.8-0ubuntu0.20.04.1 amd64 +postgresql-client-12 12.9-0ubuntu0.20.04.1 amd64 -postgresql-doc-12 12.8-0ubuntu0.20.04.1 all +postgresql-doc-12 12.9-0ubuntu0.20.04.1 all -python3-ldb 2:2.0.10-0ubuntu0.20.04.3 amd64 +python3-ldb 2:2.2.3-0ubuntu0.20.04.2 amd64 -python3-samba 2:4.11.6+dfsg-0ubuntu1.10 amd64 +python3-samba 2:4.13.14+dfsg-0ubuntu0.20.04.1 amd64 -python3-talloc 2.3.0-3ubuntu1 amd64 -python3-tdb 1.4.2-3build1 amd64 +python3-talloc 2.3.1-0ubuntu0.20.04.1 amd64 +python3-tdb 1.4.3-0ubuntu0.20.04.1 amd64 -samba 2:4.11.6+dfsg-0ubuntu1.10 amd64 -samba-common 2:4.11.6+dfsg-0ubuntu1.10 all -samba-common-bin 2:4.11.6+dfsg-0ubuntu1.10 amd64 -samba-dsdb-modules 2:4.11.6+dfsg-0ubuntu1.10 amd64 -samba-libs 2:4.11.6+dfsg-0ubuntu1.10 amd64 -samba-vfs-modules 2:4.11.6+dfsg-0ubuntu1.10 amd64 +samba 2:4.13.14+dfsg-0ubuntu0.20.04.1 amd64 +samba-common 2:4.13.14+dfsg-0ubuntu0.20.04.1 all +samba-common-bin 2:4.13.14+dfsg-0ubuntu0.20.04.1 amd64 +samba-dsdb-modules 2:4.13.14+dfsg-0ubuntu0.20.04.1 amd64 +samba-libs 2:4.13.14+dfsg-0ubuntu0.20.04.1 amd64 +samba-vfs-modules 2:4.13.14+dfsg-0ubuntu0.20.04.1 amd64 -smbclient 2:4.11.6+dfsg-0ubuntu1.10 amd64 +smbclient 2:4.13.14+dfsg-0ubuntu0.20.04.1 amd64 -tdb-tools 1.4.2-3build1 amd64 +tdb-tools 1.4.3-0ubuntu0.20.04.1 amd64 -ufw 0.36-6 all +ufw 0.36-6ubuntu1 all -winbind 2:4.11.6+dfsg-0ubuntu1.10 amd64 +winbind 2:4.13.14+dfsg-0ubuntu0.20.04.1 amd64 --- ctdb/functions | 2 -- ctdb/nfs-linux-kernel-callout | 3 +++ ctdb/statd-callout | 21 +++++++++++++++++---- 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/ctdb/functions b/ctdb/functions index 4ac8a4f..962196f 100644 --- a/ctdb/functions +++ b/ctdb/functions @@ -228,8 +228,6 @@ ctdb_get_ip_address () awk -F '|' 'NR == 2 { print $3 }' >"$_ip_addr_file" fi - # ip_address is used by caller - # shellcheck disable=SC2034 cat "$_ip_addr_file" } diff --git a/ctdb/nfs-linux-kernel-callout b/ctdb/nfs-linux-kernel-callout index 44244fc..79332f6 100755 --- a/ctdb/nfs-linux-kernel-callout +++ b/ctdb/nfs-linux-kernel-callout @@ -307,6 +307,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" diff --git a/ctdb/statd-callout b/ctdb/statd-callout index 2d99278..564f6d9 100755 --- a/ctdb/statd-callout +++ b/ctdb/statd-callout @@ -3,10 +3,18 @@ # This must run as root as CTDB tool commands need to access CTDB socket [ "$(id -u)" -eq 0 ] || exec sudo "$0" "$@" -# this script needs to be installed so that statd points to it with the -H -# command line argument. The easiest way to do that is to put something like this in -# /etc/sysconfig/nfs: -# STATD_HOSTNAME="myhostname -H /etc/ctdb/statd-callout" +# statd must be configured to use this script as its high availability call-out. +# +# In most Linux versions this can be done using something like the following... +# +# /etc/sysconfig/nfs (Red Hat) or /etc/default/nfs-common (Debian): +# NFS_HOSTNAME=myhostname +# STATD_HOSTNAME="${NFS_HOSTNAME} -H /etc/ctdb/statd-callout" +# +# Newer Red Hat Linux variants instead use /etc/nfs.conf: +# [statd] +# name = myhostname +# ha-callout = /etc/ctdb/statd-callout [ -n "$CTDB_BASE" ] || \ CTDB_BASE=$(d=$(dirname "$0") ; cd -P "$d" ; echo "$PWD") @@ -23,6 +31,11 @@ die () # Try different variables to find config file for NFS_HOSTNAME load_system_config "nfs-kernel-server" +# If NFS_HOSTNAME not set then try to pull it out of /etc/nfs.conf +if [ -z "$NFS_HOSTNAME" ] && type nfsconf >/dev/null 2>&1 ; then + NFS_HOSTNAME=$(nfsconf --get statd name) +fi + [ -n "$NFS_HOSTNAME" ] || \ die "NFS_HOSTNAME is not configured. statd-callout failed" -- 2.39.5