Skip to content

Commit

Permalink
ctdb: Leave CTDB log levels at their original defaults
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
anoopcs9 authored and mergify[bot] committed Oct 4, 2024
1 parent d61df07 commit 282b0b9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions sambacc/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,8 +312,8 @@ def ctdb_config(self) -> dict[str, str]:
ctdb.setdefault("cluster_meta_uri", CLUSTER_META_JSON)
ctdb.setdefault("nodes_path", CTDB_NODES_PATH)
ctdb.setdefault("recovery_lock", CTDB_RECLOCK)
ctdb.setdefault("log_level", "DEBUG")
ctdb.setdefault("script_log_level", "DEBUG")
ctdb.setdefault("log_level", "NOTICE")
ctdb.setdefault("script_log_level", "ERROR")
ctdb.setdefault("realtime_scheduling", "false")
# this whole thing really needs to be turned into a real object type
ctdb.setdefault("public_addresses", [])
Expand Down
3 changes: 2 additions & 1 deletion tests/test_ctdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,8 @@ def test_ensure_ctdb_conf(tmpdir):
ctdb.ensure_ctdb_conf(iconfig=cfg.get("ctdb1"), path=path)
with open(path, "r") as fh:
data = fh.read()
assert "DEBUG" in data
assert "NOTICE" in data
assert "ERROR" in data
assert "/var/lib/ctdb/shared/RECOVERY" in data


Expand Down

0 comments on commit 282b0b9

Please sign in to comment.