]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ctdb-common: Log a message if the tunables file does not exist
authorMartin Schwenke <mschwenke@ddn.com>
Sun, 29 Jun 2025 00:16:20 +0000 (10:16 +1000)
committerMartin Schwenke <martins@samba.org>
Tue, 22 Jul 2025 23:02:34 +0000 (23:02 +0000)
Switch the unit test script to INFO debug level to ensure this output
appears when expected.

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/common/tunable.c
ctdb/tests/UNIT/cunit/tunable_test_001.sh

index 73ebbe77d9c39687d2c66f29d2194c781e9892f7..ec5a119bc5a50eaed74e7aed884a15c3125c10db 100644 (file)
@@ -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;
                }
 
index d180b8ea5ff6f8c000c4846ce4c15009b114e7d6..64eab8de2ab3760442b15df0ba1e40fe2e3fbcbb 100755 (executable)
@@ -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"