From 2cdfa8fcaee4195a9aa613e2c37e97fb6c7fc1a6 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Tue, 22 Aug 2017 16:50:04 -0400 Subject: [PATCH] Do not let a single node error stop all pending node Isolate faults to single node for better robust behavior. --- confluent_server/confluent/discovery/core.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/confluent_server/confluent/discovery/core.py b/confluent_server/confluent/discovery/core.py index c9ef627d..9b820c95 100644 --- a/confluent_server/confluent/discovery/core.py +++ b/confluent_server/confluent/discovery/core.py @@ -366,8 +366,13 @@ def _recheck_nodes(nodeattribs, configmanager): # policy or hadn't been able to verify key for nodename in pending_nodes: info = pending_nodes[nodename] - handler = info['handler'].NodeHandler(info, configmanager) - eventlet.spawn_n(eval_node, configmanager, handler, info, nodename) + try: + handler = info['handler'].NodeHandler(info, configmanager) + eventlet.spawn_n(eval_node, configmanager, handler, info, nodename) + except Exception: + traceback.print_exc() + log.log({'error': 'Unexpected error during discovery of {0}, check debug ' + 'logs'.format(nodename)}) def _recheck_single_unknown(configmanager, mac):