From 6671b9aad3c7fe4c0fde8891e0b63d11275696f2 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Fri, 23 Mar 2018 08:27:27 -0400 Subject: [PATCH] Provide cleaner behavior on timeouts If a timeout occurred outside of a keeplaive, provide a more consistent message about the situation. --- confluent_server/confluent/discovery/protocols/ssdp.py | 2 -- confluent_server/confluent/plugins/hardwaremanagement/ipmi.py | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/confluent_server/confluent/discovery/protocols/ssdp.py b/confluent_server/confluent/discovery/protocols/ssdp.py index de543697..2b03f28a 100644 --- a/confluent_server/confluent/discovery/protocols/ssdp.py +++ b/confluent_server/confluent/discovery/protocols/ssdp.py @@ -191,7 +191,6 @@ def _parse_ssdp(peer, rsp, peerdata): _, code, _ = headlines[0].split(' ', 2) except ValueError: return - myurl = None if code == '200': if nid in peerdata: peerdatum = peerdata[nid] @@ -208,7 +207,6 @@ def _parse_ssdp(peer, rsp, peerdata): header = header.strip() value = value.strip() if header == 'AL' or header == 'LOCATION': - myurl = value if 'urls' not in peerdatum: peerdatum['urls'] = [value] elif value not in peerdatum['urls']: diff --git a/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py b/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py index eff94678..e3daa375 100644 --- a/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py +++ b/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py @@ -344,7 +344,7 @@ def perform_request(operator, node, element, cfg, results).handle_request() except pygexc.IpmiException as ipmiexc: excmsg = str(ipmiexc) - if excmsg == 'Session no longer connected': + if excmsg in ('Session no longer connected', 'timeout'): results.put(msg.ConfluentTargetTimeout(node)) else: results.put(msg.ConfluentNodeError(node, excmsg))