From 9b48110155725eb756fe3718c0ffedcb0a86a73b Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Thu, 16 Aug 2018 14:43:16 -0400 Subject: [PATCH] Do not proceed a logged, but broken session It shouldn't be possible for this to be the case, but out of an abundance of caution, check for this. So far only produced this by forcing broken = True in a debug session. Intended to catch an alleged scenario where console was managing to use a broken session (fixed in pyghmi) and have confluent also recognize the situation for non-console usage). --- confluent_server/confluent/plugins/hardwaremanagement/ipmi.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py b/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py index b75c1062..630ed598 100644 --- a/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py +++ b/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py @@ -395,7 +395,8 @@ class IpmiHandler(object): self.tenant = cfg.tenant tenant = cfg.tenant if ((node, tenant) not in persistent_ipmicmds or - not persistent_ipmicmds[(node, tenant)].ipmi_session.logged): + not persistent_ipmicmds[(node, tenant)].ipmi_session.logged or + persistent_ipmicmds[(node, tenant)].ipmi_session.broken): try: persistent_ipmicmds[(node, tenant)].close_confluent() except KeyError: # was no previous session