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: talloc-2.4.0~809 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d9dda4b7af284ecbee4d04a89bd16fc0098e2931;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 --- diff --git a/ctdb/config/functions b/ctdb/config/functions index dcb04ebb5ef..328b4b0ab50 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 }