Commit 79bec796 authored by Ian Baum's avatar Ian Baum

Merge branch 'docs-abuerer-fix-repmgr-restore-steps' into 'master'

Fix repmgr restore steps to avoid subsequent failures

See merge request gitlab-org/gitlab!27548
parents 54a9bc6f f0bd56b3
......@@ -872,8 +872,9 @@ standby nodes.
If a node fails, it can be removed from the cluster, or added back as a standby
after it has been restored to service.
- If you want to remove the node from the cluster, on any other node in the
cluster, run:
##### Remove a standby from the cluster
From any other node in the cluster, run:
```shell
gitlab-ctl repmgr standby unregister --node=X
......@@ -893,13 +894,15 @@ after it has been restored to service.
959789412
```
Then you will use this id to unregister the node:
Then you will use this ID to unregister the node:
```shell
gitlab-ctl repmgr standby unregister --node=959789412
```
##### Add a node as a standby server
- To add the node as a standby server:
From the stnadby node, run:
```shell
gitlab-ctl repmgr standby follow NEW_MASTER
......@@ -912,6 +915,28 @@ after it has been restored to service.
this will cause a split, and the old master will need to be resynced from
scratch by performing a `gitlab-ctl repmgr standby setup NEW_MASTER`.
##### Add a failed master back into the cluster as a standby node
Once `repmgrd` and PostgreSQL are runnning, the node will need to follow the new
as a standby node.
```
gitlab-ctl repmgr standby follow NEW_MASTER
```
Once the node is following the new master as a standby, the node needs to be
[unregistered from the cluster on the new master node](#remove-a-standby-from-the-cluster).
Once the old master node has been unregistered from the cluster, it will need
to be setup as a new standby:
```
gitlab-ctl repmgr standby setup NEW_MASTER
```
Failure to unregister and readd the old master node can lead to subsequent failovers
not working.
#### Alternate configurations
##### Database authorization
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment