From d9dda4b7af284ecbee4d04a89bd16fc0098e2931 Mon Sep 17 00:00:00 2001 From: Martin Schwenke Date: Tue, 6 Sep 2022 11:59:11 +1000 Subject: [PATCH] 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 --- ctdb/config/functions | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 }