Repository navigation
Description
What happens
Configuration.to_yaml() in sdks/python/objectfs/config.py emits a cluster block containing election_timeout, heartbeat_interval and join_timeout. internal/config.ClusterConfig has never had any of them, and Configuration.LoadFromFile decodes strictly, so the daemon refuses the file at startup on the first one:
line 3: field election_timeout not found in type config.ClusterConfig
Verified by execution against the loader, not inferred from reading the struct.
So the SDK's documented path — build a Configuration, save_to_file, mount with it — cannot work for any config with a cluster block. sdks/python/README.md's "Distributed Clusters" section shows exactly that sequence.
Why the fields are there
They exist on internal/distributed.ClusterConfig, which is a disjoint type from internal/config.ClusterConfig — same name, different package, different fields, no conversion between them. #139 is where that split is tracked. The Python dataclass appears to have been written against the distributed one while to_yaml targets the config one.
Fix
Drop the three fields from the Python ClusterConfig dataclass and from _cluster_preset, matching what the Go cluster schema actually accepts. Do not add them to the Go schema instead: the distributed timeouts are per-node consensus tuning that reaches NewClusterManager through a different path, and duplicating them in the file schema would give an operator two places to set one value.
The one that needs a decision is join_timeout — grep for a consumer before removing, since unlike the other two it may not correspond to anything in either struct.
Not in scope of #284
Found while verifying that removing consistency_level genuinely breaks a config that still sets it (it does — the loader names the key and line). Recorded in the ClusterConfig docstring as a separate pre-existing defect rather than folded into that change.
Acceptance criteria
-
to_yaml()output for every preset loads underinternal/config.Configuration.LoadFromFilewithout error - A test asserts that, rather than asserting the emitted keys against a hand-written list — the list is what drifted
-
join_timeout's intended consumer identified, or the field removed
Activity
feat(distributed)!: replace the N-identical-PUT fan-out with per-key …
fix(sdk): the Python SDK wrote config files the daemon refused to sta…