From 5e43f9bd7cca450662d7cb2b086cdee62a36db79 Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Tue, 29 Aug 2023 22:00:11 -0400 Subject: [PATCH] Ensure Patroni failures do not block takeover --- node-daemon/pvcnoded/objects/NodeInstance.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/node-daemon/pvcnoded/objects/NodeInstance.py b/node-daemon/pvcnoded/objects/NodeInstance.py index a59770e0..a82aa329 100644 --- a/node-daemon/pvcnoded/objects/NodeInstance.py +++ b/node-daemon/pvcnoded/objects/NodeInstance.py @@ -620,9 +620,12 @@ class NodeInstance(object): for network in self.d_network: self.d_network[network].startDHCPServer() # 9. Start DNS aggregator; just continue if we fail - if not patroni_failed: - self.dns_aggregator.start_aggregator() - else: + try: + if not patroni_failed: + self.dns_aggregator.start_aggregator() + else: + raise + except Exception: self.logger.out( "Not starting DNS aggregator due to Patroni failures", state="e" )