Treat Patroni streaming state as a running node (backport to 19-3-stable)
What does this MR do and why?
This backports Treat Patroni streaming state as a running node to the 19-3-stable branch.
Patroni 3.0.4+ reports a healthy standby's state as streaming (or in archive recovery), not the generic running the leader reports. The
patroni cookbook and gitlab-ctl pg-upgrade only recognized running,
so from GitLab 18.9.0 (Patroni 3.3.1) every healthy replica looked "not
running": the wait for node bootstrap to complete loop burned its full
30s timeout on every gitlab-ctl reconfigure, the edit-config, reload,
and restart guards in patroni::enable silently skipped on replicas, and
pg-upgrade stopped warning that replicas were still running before a major
upgrade.
This adds PatroniHelper#node_running? (treats running, streaming, and
in archive recovery as healthy) and uses it in the recipe guards and the
wait loop, and applies the same set of states to the replica count in
gitlab-ctl pg-upgrade.
Original MR: !9782 (merged) Related issue: #9454
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
- This MR is backporting a bug fix, documentation update, or spec fix, previously merged in the default branch.
- The original MR has been deployed to GitLab.com (not applicable for documentation or spec changes).
- This MR has a severity label assigned (if applicable).
Note to the merge request author and maintainer
If you have questions about the patch release process, please:
- Refer to the patch release runbook for engineers and maintainers for guidance.
- Ask questions on the
#releasesSlack channel (internal only).