Technical Tip: Database leader manual switchover or failover via Patroni
Description
Â
This article describes methods to switchover or failover the database leader manually via Patroni.
Â
Scope
Â
FortiSIEM v7.3.0 and above.
Â
Solution
Â
Failover steps:
If users notice the database 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 the new database Leader:
patronictl -c /etc/patroni/patroni.yml failoverÂ
Switchover steps:
Follow the steps below if there is no issue with the current database leader, and another node needs to be promoted as the new database 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 the new database Leader:
patronictl -c /etc/patroni/patroni.yml switchover --leader <Current leader node> --candidate <Node to be promoted> --force