1. [ ] 🐘 {+ Database-Wrangler +}: Convert the currect master (Azure) to a standby.
* Convert the currect master (Azure) to a standby pointing to candidate master on GCP. `/opt/gitlab-migration/bin/scripts/02_failover/060_go/p04/050-convert-azure-master-to-standby.sh`
* Check the database is now read-only`/opt/gitlab-migration/bin/scripts/02_failover/060_go/p04/051-check-azure-master-is-standby.sh`
* Wait for the GCP master candidate and previous Azure master (now standby) to have same LSN`/opt/gitlab-migration/bin/scripts/02_failover/060_go/p04/052-check-gcp-nodes-has-same-azure-lsn.sh`
* Convert the currect master (Azure) to a headless standby (a standby that does not replicate from anything). `/opt/gitlab-migration/bin/scripts/02_failover/060_go/p04/050-convert-azure-master-to-headless-standby.sh`
* Check the database is now read-only.`/opt/gitlab-migration/bin/scripts/02_failover/060_go/p04/051-check-azure-master-is-standby.sh`
* Wait for the GCP master candidate and previous Azure master (now standby) to have same LSN.`/opt/gitlab-migration/bin/scripts/02_failover/060_go/p04/052-check-gcp-nodes-has-same-azure-lsn.sh`
1. [ ] 🐘 {+ Database-Wrangler +}: Perform regular switchover to the main replica on GCP
* Check the database is now read-write. `/opt/gitlab-migration/bin/scripts/02_failover/060_go/p04/061-check-gcp-candidate-master-is-master.sh`
* Convert the old master (Azure) to a standby pointing to candidate master on GCP. `/opt/gitlab-migration/bin/scripts/02_failover/060_go/p04/062-convert-azure-master-to-gcp-standby.sh`
1. [ ] 🐘 {+ Database-Wrangler +}: Start repmgrd and consul agents on GCP
* Enable automatic failover on GCP. `/opt/gitlab-migration/bin/scripts/02_failover/060_go/p04/070-enable-automatic-failover-on-gcp-only.sh`
* Check repmgr master on GCP. `/opt/gitlab-migration/bin/scripts/02_failover/060_go/p04/071-check-repmgr-master.sh`
echo "New tombstone message is not seen on $GCP_MASTER_CANDIDATE (GCP MASTER CANDIDATE). The replication delay: ${gcp_cur_rep_delay}s. Wait 3 seconds..."
sleep 3
else
echo "New tombstone message arrived to $GCP_MASTER_CANDIDATE."
break
fi
done
}
function disable-chef(){
for host in "${AZURE_HOSTS[@]}" "${GCP_HOSTS[@]}"; do