Skip to content

Commit

Permalink
When we know we failed to apply a configuration file, do not take any
Browse files Browse the repository at this point in the history
failover decision as it will most likely result in a wrong decision
being taken.
  • Loading branch information
rdunklau committed Jan 17, 2025
1 parent f486efe commit ffc1925
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pglookout/pglookout.py
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,8 @@ def check_cluster_state(self):
self.consider_failover(own_state, master_node, standby_nodes)

def consider_failover(self, own_state, master_node, standby_nodes):
if self._config_version > self._config_version_applied:
self.log.warning("We couldn't apply the latest config version, do not make any decision with outdated config")
if not master_node or not master_node.get("connection"):
# no master node at all in the cluster?
self.log.warning(
Expand Down

0 comments on commit ffc1925

Please sign in to comment.