feat(controller): clusterconfig-schema-split task 2.1 — cluster_open_listener two-tier port fallback
Replaces the cluster_config->port fallback (dead after task 1.2) with: --peers candidate match (unchanged, including single self-referencing entries for a custom single-node port) -> hardcoded XCE_CONTROLLER_DEFAULT_PORT (9990) when --peers was never passed at all. The --peers-given-but-local- name-absent case still returns -EINVAL and refuses to start, unchanged. Also folds in task 1.3's discovery (HashZArrayConfig/ResmgrConfig capnp structs left orphaned by tasks 1.1/1.2, breaking codegen) into requirements.md (new Req 2.5)/design.md/research.md/tasks.md, and fixes a design.md citation error (validate_peer_count -> xce_parse_peers) found during task 2.1's review.
This commit is contained in:
parent
0205ac3cd2
commit
1229f9a945
5 changed files with 53 additions and 13 deletions
|
|
@ -18,8 +18,17 @@
|
|||
- _Depends: 1.1_
|
||||
- _Boundary: C Struct Component_
|
||||
|
||||
- [ ] 1.3 Remove the orphaned `HashZArrayConfig`/`ResmgrConfig` capnp structs
|
||||
- Discovered during task 2.1's partial compile check: these structs (used only by the fields task 1.1 already removed) were deliberately left in `controller.capnp`, but task 1.2 removed their corresponding hand-written C typedefs (`hash_zarray_config_t`, `resmgr_config_t`) — the capnp-generated bindings still reference those now-nonexistent types via `$C.mapname(...)`, breaking compilation
|
||||
- Remove the `HashZArrayConfig` and `ResmgrConfig` struct definitions entirely from `controller.capnp` (grep-verify first that neither is referenced anywhere else in the schema, same method used for `MasterCandidate` in task 1.1)
|
||||
- Regenerate the capnp C bindings
|
||||
- Observable: capnp compiler succeeds; the generated bindings no longer emit any `HashZArrayConfig`/`ResmgrConfig`/`hash_zarray_config_t`/`resmgr_config_t` reference anywhere
|
||||
- _Requirements: 2.5_
|
||||
- _Depends: 1.1, 1.2_
|
||||
- _Boundary: Schema Component_
|
||||
|
||||
- [ ] 2. Core: cluster.c Port Resolution, Debug-Dump & Port-Defaulting Cleanup
|
||||
- [ ] 2.1 Update `cluster_open_listener`'s port-resolution fallback
|
||||
- [x] 2.1 Update `cluster_open_listener`'s port-resolution fallback
|
||||
- Change the fallback branch from reading `cluster_config->port` to a new hardcoded `XCE_CONTROLLER_DEFAULT_PORT` constant (9990), reached only when `--peers` was never passed at all (`peers_cfg.candidates_count == 0`)
|
||||
- Do NOT add a new CLI flag or `myconf_t` field — the `--peers` candidate-match branch (including its existing single self-referencing `--peers <name>=<host>:<port>` usage for single-node mode) is left completely unchanged; this is the only mechanism an operator uses to get a non-default single-node port
|
||||
- Preserve the exact precedence and branch structure: a `--peers` match with nonzero port binds to it unchanged; a matched candidate with port == 0 falls through to the hardcoded-default tier exactly as today's tolerated case; `--peers` passed but local name absent still returns `-EINVAL` and refuses to start, unchanged
|
||||
|
|
@ -58,7 +67,7 @@
|
|||
- Run the full existing suite and compare against the pre-spec baseline
|
||||
- Observable: build completes with zero compile errors; `controller_unit_test` passes with no new failures attributable to the removed fields
|
||||
- _Requirements: 5.1, 5.2_
|
||||
- _Depends: 1.1, 1.2, 2.1, 2.2, 2.3, 3_
|
||||
- _Depends: 1.1, 1.2, 1.3, 2.1, 2.2, 2.3, 3_
|
||||
|
||||
- [ ] 5. Validation: Live HA Verification
|
||||
- [ ] 5.1 Regenerate the `ha/data/cluster.bin` fixture against the renumbered schema
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue