From: Martin Schwenke Date: Sun, 29 Jun 2025 00:16:20 +0000 (+1000) Subject: ctdb-common: Log a message if the tunables file does not exist X-Git-Tag: tdb-1.4.14~89 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cdb02782f950bf3a7585a8390a0c40ed81cd3971;p=thirdparty%2Fsamba.git ctdb-common: Log a message if the tunables file does not exist Switch the unit test script to INFO debug level to ensure this output appears when expected. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- diff --git a/ctdb/common/tunable.c b/ctdb/common/tunable.c index 73ebbe77d9c..ec5a119bc5a 100644 --- a/ctdb/common/tunable.c +++ b/ctdb/common/tunable.c @@ -365,7 +365,7 @@ bool ctdb_tunable_load_file(TALLOC_CTX *mem_ctx, fp = fopen(file, "r"); if (fp == NULL) { if (errno == ENOENT) { - /* Doesn't need to exist */ + D_INFO("Optional tunables file %s not found\n", file); return true; } diff --git a/ctdb/tests/UNIT/cunit/tunable_test_001.sh b/ctdb/tests/UNIT/cunit/tunable_test_001.sh index d180b8ea5ff..64eab8de2ab 100755 --- a/ctdb/tests/UNIT/cunit/tunable_test_001.sh +++ b/ctdb/tests/UNIT/cunit/tunable_test_001.sh @@ -93,6 +93,7 @@ ok_tunable_1() _file="$1" if [ ! -r "$_file" ]; then + tunable_log "INFO" "Optional tunables file ${_file} not found" return fi @@ -130,7 +131,7 @@ ok_tunable() ok "${log}$(echo "$_map" | awk -F: '{ print $2 }')" } -export CTDB_DEBUGLEVEL="NOTICE" +export CTDB_DEBUGLEVEL="INFO" test_case "Unreadable file" : >"$tfile"