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 <anoopcs@samba.org>
  • Loading branch information
anoopcs9 committed Oct 4, 2024
1 parent d61df07 commit 3dc1382
Show file tree
Hide file tree
Showing 2 changed files with 3 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
2 changes: 1 addition & 1 deletion tests/test_ctdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ 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 "/var/lib/ctdb/shared/RECOVERY" in data


Expand Down

0 comments on commit 3dc1382

Please sign in to comment.