[SCM] Samba Shared Repository - branch master updated

Amitay Isaacs amitay at samba.org
Mon Jul 10 15:16:01 UTC 2023


The branch, master has been updated
       via  61dfc8bc069 ctdb-server: Avoid logging a count of 0 resent calls
       via  60bf6f68e17 ctdb-tools: Switch tickle ACK sending message to INFO level
       via  6dac1da9cd3 ctdb-tools: Fix a typo in a log message
       via  51d0445a7d7 ctdb-logging: Really make NOTICE the default debug level
      from  edad945339f librpc/nbt: Avoid reading invalid member of union

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 61dfc8bc0695931e7dd7fed842d0561065af179c
Author: Martin Schwenke <mschwenke at ddn.com>
Date:   Thu Jun 15 10:31:07 2023 +1000

    ctdb-server: Avoid logging a count of 0 resent calls
    
    This fixes a little thinko in commit
    80de84d36e9c29d9506976f991560fb5dde99471, where this was overlooked.
    
    Signed-off-by: Martin Schwenke <mschwenke at ddn.com>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>
    
    Autobuild-User(master): Amitay Isaacs <amitay at samba.org>
    Autobuild-Date(master): Mon Jul 10 15:15:06 UTC 2023 on atb-devel-224

commit 60bf6f68e17c37debc54304c45a1e3695a97c3cc
Author: Martin Schwenke <mschwenke at ddn.com>
Date:   Wed Mar 1 08:51:08 2023 +1100

    ctdb-tools: Switch tickle ACK sending message to INFO level
    
    DEBUG level logging in ctdb_killtcp is very noisy.  The most important
    messages when debugging are those for tickle ACKs and TCP RSTs.  TCP
    RSTs are already logged at INFO level, so promote tickle ACKs to INFO
    level too.
    
    Signed-off-by: Martin Schwenke <mschwenke at ddn.com>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit 6dac1da9cd303791c2b140548435a8a1417e7232
Author: Martin Schwenke <mschwenke at ddn.com>
Date:   Wed Mar 1 08:43:30 2023 +1100

    ctdb-tools: Fix a typo in a log message
    
    Signed-off-by: Martin Schwenke <mschwenke at ddn.com>
    Reported-by: Ulrich Sibiller <ulrich.sibiller at atos.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit 51d0445a7d7401699cf65d648ef007814258fb54
Author: Martin Schwenke <mschwenke at ddn.com>
Date:   Fri Feb 10 17:57:13 2023 +1100

    ctdb-logging: Really make NOTICE the default debug level
    
    NOTICE level debug messages in common/run_event.c are not logged by
    default.
    
    Currently eventd ends up using ERROR, since this is specified as
    LOGGING_LOG_LEVEL_DEFAULT.  It doesn't inherit the debug level from
    ctdbd and only uses NOTICE level when interactive.
    
    Change the real logging default to NOTICE and use it everywhere.
    
    Followups might be:
    
    * Remove the default_log_level argument to logging_conf_init()
    * Kick eventd to update debug level when "ctdb setdebug" is used
    
    Signed-off-by: Martin Schwenke <mschwenke at ddn.com>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

-----------------------------------------------------------------------

Summary of changes:
 ctdb/common/logging_conf.c               | 2 +-
 ctdb/server/ctdb_call.c                  | 4 ++++
 ctdb/server/ctdb_config.c                | 2 +-
 ctdb/tests/UNIT/cunit/config_test_001.sh | 2 +-
 ctdb/tests/UNIT/cunit/config_test_002.sh | 2 +-
 ctdb/tools/ctdb_killtcp.c                | 6 +++---
 6 files changed, 11 insertions(+), 7 deletions(-)


Changeset truncated at 500 lines:

diff --git a/ctdb/common/logging_conf.c b/ctdb/common/logging_conf.c
index 1cd929eb533..38b3003a3f7 100644
--- a/ctdb/common/logging_conf.c
+++ b/ctdb/common/logging_conf.c
@@ -26,7 +26,7 @@
 #include "common/logging_conf.h"
 
 #define LOGGING_LOCATION_DEFAULT	"file:" LOGDIR "/log.ctdb"
-#define LOGGING_LOG_LEVEL_DEFAULT	"ERROR"
+#define LOGGING_LOG_LEVEL_DEFAULT	"NOTICE"
 
 static bool logging_conf_validate_log_level(const char *key,
 					    const char *old_loglevel,
diff --git a/ctdb/server/ctdb_call.c b/ctdb/server/ctdb_call.c
index cef271958c5..a51a92d3e45 100644
--- a/ctdb/server/ctdb_call.c
+++ b/ctdb/server/ctdb_call.c
@@ -1417,6 +1417,10 @@ void ctdb_call_resend_db(struct ctdb_db_context *ctdb_db)
 		ctdb_call_resend(state);
 		count++;
 	}
+	/* Avoid logging a 0 count below */
+	if (count == 0) {
+		return;
+	}
 	D_NOTICE("Resent calls for database=%s, generation=%u, count=%u\n",
 		 ctdb_db->db_name,
 		 ctdb_db->generation,
diff --git a/ctdb/server/ctdb_config.c b/ctdb/server/ctdb_config.c
index 72830278c42..3f61fdae169 100644
--- a/ctdb/server/ctdb_config.c
+++ b/ctdb/server/ctdb_config.c
@@ -145,7 +145,7 @@ int ctdbd_config_load(TALLOC_CTX *mem_ctx,
 		return ret;
 	}
 
-	logging_conf_init(conf, "NOTICE");
+	logging_conf_init(conf, NULL);
 	cluster_conf_init(conf);
 	database_conf_init(conf);
 	event_conf_init(conf);
diff --git a/ctdb/tests/UNIT/cunit/config_test_001.sh b/ctdb/tests/UNIT/cunit/config_test_001.sh
index 5dd45819968..70bf77f7939 100755
--- a/ctdb/tests/UNIT/cunit/config_test_001.sh
+++ b/ctdb/tests/UNIT/cunit/config_test_001.sh
@@ -30,7 +30,7 @@ database_state_dbdir=$(ctdb-config get \
 ok <<EOF
 [logging]
 	# location = ${logging_location}
-	# log level = ERROR
+	# log level = NOTICE
 [cluster]
 	# transport = tcp
 	# node address = 
diff --git a/ctdb/tests/UNIT/cunit/config_test_002.sh b/ctdb/tests/UNIT/cunit/config_test_002.sh
index ad6d381d4ed..23b0863b4b8 100755
--- a/ctdb/tests/UNIT/cunit/config_test_002.sh
+++ b/ctdb/tests/UNIT/cunit/config_test_002.sh
@@ -19,7 +19,7 @@ cat > "$conffile" <<EOF
 EOF
 
 ok <<EOF
-ERROR
+NOTICE
 EOF
 unit_test ctdb-config get "logging" "log level"
 
diff --git a/ctdb/tools/ctdb_killtcp.c b/ctdb/tools/ctdb_killtcp.c
index 007422f42fc..fd07f4be831 100644
--- a/ctdb/tools/ctdb_killtcp.c
+++ b/ctdb/tools/ctdb_killtcp.c
@@ -198,7 +198,7 @@ static void reset_connections_capture_tcp_handler(struct tevent_context *ev,
 		return;
 	}
 
-	D_INFO("Sending a TCP RST to for connection %s\n",
+	D_INFO("Sending a TCP RST for connection %s\n",
 	       ctdb_connection_to_string(state, &conn, true));
 
 	ret = ctdb_sys_send_tcp(&conn.server, &conn.client, ack_seq, seq, 1);
@@ -291,8 +291,8 @@ static int reset_connections_tickle_connection(
 		return 1;
 	}
 
-	DBG_DEBUG("Sending tickle ACK for connection '%s'\n",
-		  ctdb_connection_to_string(state, conn, true));
+	DBG_INFO("Sending tickle ACK for connection '%s'\n",
+		 ctdb_connection_to_string(state, conn, true));
 	ret = ctdb_sys_send_tcp(&conn->server, &conn->client, 0, 0, 0);
 	if (ret != 0) {
 		DBG_ERR("Error sending tickle ACK\n");


-- 
Samba Shared Repository



More information about the samba-cvs mailing list