Skip to content

Commit 7cfee48

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 7cfee48

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pglookout/pglookout.py

+4
Original file line numberDiff line numberDiff line change
@@ -478,6 +478,10 @@ 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(
483+
"We couldn't apply the latest config version, do not make any decision with outdated config"
484+
)
481485
if not master_node or not master_node.get("connection"):
482486
# no master node at all in the cluster?
483487
self.log.warning(

0 commit comments

Comments
 (0)