Make sure primary node is down when promoting a secondary node
The command to promote the secondary node to primary display a warning message that mentions to “Make sure your primary is down”. How does an admin know if the primary is down, and what happens if it still happens to be running?
Proposal
Update the gitlab-ctl promote-to-primary-node command to do the following:
- Check TCP connectivity to the primary's PostgreSQL server.
- Call the health endpoint on the primary node.
In case that any of those calls do not fail we should abort the command.
Edited by Douglas Barbosa Alexandre