feat(controller-peers-env-fallback): fall back to XCE_CONTROLLER_PEERS in the controller and name the value's source (task 2.3)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
25e2807355
commit
64d3429cd8
3 changed files with 154 additions and 14 deletions
|
|
@ -35,7 +35,7 @@
|
|||
- Done when, after rebuilding the controller, the controller suite passes and that case shows the line in the log file in all 20 runs
|
||||
- _Requirements: 1.3_
|
||||
|
||||
- [ ] 2.3 Fall back to the environment variable in the controller and name the value's source
|
||||
- [x] 2.3 Fall back to the environment variable in the controller and name the value's source
|
||||
- Add the controller cases to the regression script first and see them fail: env list used with no `--peers`, an odd candidate count and `--myname` naming a candidate ("HA mode: N controller candidates" in the log), so neither the even-count rule nor the own-name check in 2.4 masks the result; `--peers` winning; neither set (extended standalone line); empty variable (standalone); parse and even-count errors from each source naming that source on stderr; `--help` naming the variable and the opt-out. Each run gets scratch work, certificate and log paths, so it stops at the certificate pre-flight
|
||||
- Use the variable as the peers list only when no `--peers` is given, and remember whether it supplied the list
|
||||
- Name the source in the parse-error and even-count messages; extend the "No --peers flag" line to say the variable was unset or empty; add the variable and the opt-out note to the `--peers` help
|
||||
|
|
@ -134,3 +134,4 @@
|
|||
- (1.3) Drop the file-wide `shellcheck disable=SC2329,SC2034` once cases call the helpers, so real unused-variable warnings surface.
|
||||
- (2.2) The tlog early-exit race did not reproduce on this machine (0/20 before the fix, 0/200 ad hoc); `case_controller_log_flushed_on_early_exit` is kept as a regression guard, not proof of the fix.
|
||||
- (2.2 → 2.3) That case matches the text "No --peers flag; running as single-node primary"; when 2.3 extends the line (1.8), keep that text intact or update the case's pattern.
|
||||
- (2.3) The 1.8 wording cannot contain the old "No --peers flag; running ..." substring, so the 2.2 flush case now matches the full new line. Env-sourced "HA mode" lines end " (from XCE_CONTROLLER_PEERS)"; explicit-`--peers` lines and error texts are unchanged apart from naming the source. Reword the script header's "while the case list is empty" comment in 3.x when the shellcheck disable is dropped.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue