Ensure Patroni failures do not block takeover

This commit is contained in:
Joshua Boniface 2023-08-29 22:00:11 -04:00
parent ed087d83c2
commit 5e43f9bd7c
1 changed files with 6 additions and 3 deletions

View File

@ -620,9 +620,12 @@ class NodeInstance(object):
for network in self.d_network: for network in self.d_network:
self.d_network[network].startDHCPServer() self.d_network[network].startDHCPServer()
# 9. Start DNS aggregator; just continue if we fail # 9. Start DNS aggregator; just continue if we fail
if not patroni_failed: try:
self.dns_aggregator.start_aggregator() if not patroni_failed:
else: self.dns_aggregator.start_aggregator()
else:
raise
except Exception:
self.logger.out( self.logger.out(
"Not starting DNS aggregator due to Patroni failures", state="e" "Not starting DNS aggregator due to Patroni failures", state="e"
) )