Skip to content

Commit c6acc23

Browse files
phlogistonjohnmergify[bot]
authored andcommitted
sambacc: replace path key with uri key for ctdb metadata state object
The sambacc system has a "meta-management" JSON file that it uses for interacting with CTDB. Currently, this must be a file in the file system. However, future changes are going to make supporting different back-ends and protocols possible. Rename the key in the config to reflect that fact. NB: This state file gets written to by sambacc and thus not all the same protocol for config files and such are supported here. Signed-off-by: John Mulligan <[email protected]>
1 parent 6862cc8 commit c6acc23

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

sambacc/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ def ctdb_config(self) -> dict[str, str]:
309309
if not self.with_ctdb:
310310
return {}
311311
ctdb = dict(self.gconfig.data.get("ctdb", {}))
312-
ctdb.setdefault("nodes_json", CLUSTER_META_JSON)
312+
ctdb.setdefault("cluster_meta_uri", CLUSTER_META_JSON)
313313
ctdb.setdefault("nodes_path", CTDB_NODES_PATH)
314314
ctdb.setdefault("recovery_lock", CTDB_RECLOCK)
315315
ctdb.setdefault("log_level", "DEBUG")

tests/test_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ def test_instance_ctdb_config():
545545
c2 = sambacc.config.GlobalConfig(io.StringIO(ctdb_config1))
546546
i2 = c2.get("ctdb1")
547547
cfg = i2.ctdb_config()
548-
assert "nodes_json" in cfg
548+
assert "cluster_meta_uri" in cfg
549549
assert "nodes_path" in cfg
550550
assert "log_level" in cfg
551551

0 commit comments

Comments
 (0)