Geo: Document how to make promote-to-primary-node work in multi-node setups
The current gitlab-ctl promote-to-primary-node command doesn't work in a multi-node HA setup, and it's not clear from the documentation what it's doing behind the scenes, which seems important in a recovery scenario.
First, we need to document that it does the following:
- Promotes the PostgreSQL secondary to primary by touching the trigger file (
/tmp/postgresql.trigger) - Removes the git user SSH keys (is this really necessary?)
- Runs
gitlab-ctl reconfigure(why?) - Runs
gitlab-rake geo:set_secondary_as_primary
In my multi-node set up, I did the following:
- Logged into the Geo secondary PostgreSQL DB and ran
touchby hand - Logged into the Rails host and ran
gitlab-rake geo:set_secondary_as_primary
I already had SSH keys configured the same for the primary and the secondary Geo installations, but I don't still fully understand why step 2 or 3 are needed.
/cc: @brodock