Management subsystem Postgres failover steps
If your Postgres leader pod is not the original Postgres leader, complete the failover steps to restore the original pod as leader.
Before you begin
- If the apicops version:pre-upgrade command
reports:
Current postgres leader is not the original leader
- Openshift and Cloud Pak for Integration only:
Your API Connect cluster
CR reports
Error
status, and the output of:
shows:oc get apiconnectcluster -n <namespace> -o yaml
Original PostgreSQL primary is running as replica, please perform failover to original primary before attempting upgrade. Refer - https://ibm.biz/BdPLWU
- When you attempt to upgrade the management subsystem by editing the management CR to change the
version and license and you see this
error:
Original PostgreSQL primary is running as replica, please perform failover to original primary before attempting upgrade. Refer - https://ibm.biz/BdPLWU
About this task
The management subsystem uses Postgres as the database. A three replica
API Connect deployment
has a Postgres cluster that consists of 1 Postgres leader, and 2 Postgres replicas.
Note: In
Kubernetes terminology, every pod in a cluster is called a
If the current Postgres cluster leader in your management deployment
is not the original leader, then problems can occur during upgrade. To prevent upgrade problems,
follow the steps in this topic to identify the original Postgres leader and assign it as the leader
again.replica. In Postgres terminology, a Postgres cluster consists of
members, one of the members is designated as the leader, and the others are designated as
replicas. During normal operation, the Postgres cluster member that is the leader can change; one of the Postgres replicas can become the leader, and the original leader become a replica.
Note: If you have an OVA deployment, run the steps that are documented in this topic from your
management virtual appliance, as the root user: Login to your management virtual appliance with an SSH client and the
username
apicadm
, then switch to the root user with sudo
-i
.