From 0446b2db028c71366677935b28b735e18bf83198 Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Wed, 7 Aug 2019 11:46:58 -0400 Subject: [PATCH] Catch exceptions if Patroni is not up --- node-daemon/pvcd/Daemon.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/node-daemon/pvcd/Daemon.py b/node-daemon/pvcd/Daemon.py index a54974d3..07e59068 100644 --- a/node-daemon/pvcd/Daemon.py +++ b/node-daemon/pvcd/Daemon.py @@ -797,7 +797,10 @@ if enable_networking: if not network in network_list: d_network[network] = VXNetworkInstance.VXNetworkInstance(network, zk_conn, config, logger, this_node) if config['daemon_mode'] == 'coordinator' and d_network[network].nettype == 'managed': - dns_aggregator.add_network(d_network[network]) + try: + dns_aggregator.add_network(d_network[network]) + except Exception as e: + logger.out('Failed to create DNS Aggregator for network {}'.format(network), 'w') # Start primary functionality if this_node.router_state == 'primary' and d_network[network].nettype == 'managed': d_network[network].createGateways()