Technical Tip: DB leader manual switchover or failover via Patroni
Description
This article provides methods to switchover or failover the DB leader manually via Patroni.
Scope
FortiSIEM v7.3.0 and above.
Solution
Failover Steps
If users notice the DB leader is not configured as expected, users may execute the following commands to failover to the desired node:
- Get the Patroni table and node name:
patronictl -c /etc/patroni/patroni.yml list
- Use the failover command, inputting the node name to set as new DB Leader:
patronictl -c /etc/patroni/patroni.yml failover
Switchover steps:
Follow the steps below if there is no issue with the current DB leader and another node needs to be promoted as the new DB leader.
- Get the Patroni table and node name:
patronictl -c /etc/patroni/patroni.yml list
- Use the switchover command, inputting the node name to set as new DB Leader:
patronictl -c /etc/patroni/patroni.yml switchover
