Skip to content

Commit 282b0b9

Browse files
anoopcs9mergify[bot]
authored andcommitted
ctdb: Leave CTDB log levels at their original defaults
There is too much information with the 'log level' explicitily set to DEBUG for ctdbd flooding the log file destination. Similarly 'script log level' option might also spit out more when set to DEBUG. Instead of removing the options altogether we change the sambacc defaults from DEBUG to NOTCE and ERROR respectively for 'log level' and 'script log level' options as specified in man ctdb.conf(5). ref: https://ctdb.samba.org/manpages/ctdb.conf.5.html Signed-off-by: Anoop C S <[email protected]>
1 parent d61df07 commit 282b0b9

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

sambacc/config.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -312,8 +312,8 @@ def ctdb_config(self) -> dict[str, str]:
312312
ctdb.setdefault("cluster_meta_uri", CLUSTER_META_JSON)
313313
ctdb.setdefault("nodes_path", CTDB_NODES_PATH)
314314
ctdb.setdefault("recovery_lock", CTDB_RECLOCK)
315-
ctdb.setdefault("log_level", "DEBUG")
316-
ctdb.setdefault("script_log_level", "DEBUG")
315+
ctdb.setdefault("log_level", "NOTICE")
316+
ctdb.setdefault("script_log_level", "ERROR")
317317
ctdb.setdefault("realtime_scheduling", "false")
318318
# this whole thing really needs to be turned into a real object type
319319
ctdb.setdefault("public_addresses", [])

tests/test_ctdb.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,8 @@ def test_ensure_ctdb_conf(tmpdir):
438438
ctdb.ensure_ctdb_conf(iconfig=cfg.get("ctdb1"), path=path)
439439
with open(path, "r") as fh:
440440
data = fh.read()
441-
assert "DEBUG" in data
441+
assert "NOTICE" in data
442+
assert "ERROR" in data
442443
assert "/var/lib/ctdb/shared/RECOVERY" in data
443444

444445

0 commit comments

Comments
 (0)