Skip to content

Commit ffc1925

Browse files
committed
When we know we failed to apply a configuration file, do not take any
failover decision as it will most likely result in a wrong decision being taken.
1 parent f486efe commit ffc1925

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pglookout/pglookout.py

+2
Original file line numberDiff line numberDiff line change
@@ -478,6 +478,8 @@ def check_cluster_state(self):
478478
self.consider_failover(own_state, master_node, standby_nodes)
479479

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

0 commit comments

Comments
 (0)