From 9ac83665c622152926d4073945f6233d372886d7 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Mon, 13 May 2019 14:37:47 -0400 Subject: [PATCH] Isolate redfish node errors If code experiences an issue specific to a node, isolate that fault to the node. --- .../confluent/plugins/hardwaremanagement/redfish.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/confluent_server/confluent/plugins/hardwaremanagement/redfish.py b/confluent_server/confluent/plugins/hardwaremanagement/redfish.py index 727d8107..b7c7cc09 100644 --- a/confluent_server/confluent/plugins/hardwaremanagement/redfish.py +++ b/confluent_server/confluent/plugins/hardwaremanagement/redfish.py @@ -33,6 +33,7 @@ import pyghmi.storage as storage ipmicommand = eventlet.import_patched('pyghmi.redfish.command') import socket import ssl +import traceback if not hasattr(ssl, 'SSLEOFError'): ssl.SSLEOFError = None @@ -213,8 +214,6 @@ def _ipmi_evtloop(): waiter = _ipmiwaiters.pop() waiter.send() except: # TODO(jbjohnso): log the trace into the log - import traceback - traceback.print_exc() @@ -326,8 +325,8 @@ def perform_request(operator, node, element, except (pygexc.InvalidParameterValue, pygexc.RedfishError) as e: results.put(msg.ConfluentNodeError(node, str(e))) except Exception as e: - results.put(e) - raise + results.put(msg.ConfluentNodeError(node, 'Unexpected Error')) + traceback.print_exc() finally: results.put('Done')