feat(controller-status): wait-primary uses authoritative ctrlstatus_primary probe (task 4.2)

This commit is contained in:
Rongsong Shen 2026-06-20 05:46:24 +00:00
parent 9e87d2c92e
commit 6747304184
2 changed files with 45 additions and 24 deletions

View file

@ -49,7 +49,7 @@
- _Requirements: 1.3, 3.3, 5.1, 5.2, 8.1, 8.2, 8.3_
- _Boundary: cmd_ctrlstatus_
- _Depends: 3.1_
- [ ] 4.2 Switch wait-primary to the authoritative status probe
- [x] 4.2 Switch wait-primary to the authoritative status probe
- Replace the wait-primary probe (currently a job-list call) with the authoritative reach-the-primary status call. Success is an authoritative reply from the primary; on success, print the primary's identity. A standby/hint answer is not success — the probe follows the redirect or keeps polling until the primary answers or the deadline elapses. Preserve the existing timeout-argument handling, monotonic deadline, poll interval, log-quieting, and success/failure exit semantics.
- Observable: against a healthy cluster wait-primary returns and names the primary; a malformed timeout still errors; the existing exit-code behavior is unchanged; and it does not succeed from a standby-only answer.
- _Requirements: 9.1, 9.2, 9.3, 9.4_