From: Martin Schwenke Date: Tue, 6 Sep 2022 01:59:11 +0000 (+1000) Subject: ctdb-scripts: Add debugging variable CTDB_KILLTCP_DEBUGLEVEL X-Git-Tag: samba-4.17.11~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ef212b021e5113a93fc65c9acf02ed5f683abd40;p=thirdparty%2Fsamba.git ctdb-scripts: Add debugging variable CTDB_KILLTCP_DEBUGLEVEL To debug ctdb_killtcp failures, add CTDB_KILLTCP_DEBUGLEVEL=DEBUG to script.options. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Tue Sep 20 11:42:16 UTC 2022 on sn-devel-184 (cherry picked from commit d9dda4b7af284ecbee4d04a89bd16fc0098e2931) --- diff --git a/ctdb/config/functions b/ctdb/config/functions index 82ed0957aa0..725993ca12f 100755 --- a/ctdb/config/functions +++ b/ctdb/config/functions @@ -452,8 +452,14 @@ kill_tcp_connections () return fi + if [ -n "$CTDB_KILLTCP_DEBUGLEVEL" ]; then + _debuglevel="$CTDB_KILLTCP_DEBUGLEVEL" + else + _debuglevel="$CTDB_DEBUGLEVEL" + fi echo "$_connections" | \ - "${CTDB_HELPER_BINDIR}/ctdb_killtcp" "$_iface" || { + CTDB_DEBUGLEVEL="$_debuglevel" \ + "${CTDB_HELPER_BINDIR}/ctdb_killtcp" "$_iface" || { echo "Failed to kill TCP connections" return }