From b3c28ad33e374d55697dfbaf4515346ff2f03a58 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Wed, 4 Jan 2017 09:17:07 -0500 Subject: [PATCH] Defer assigning of self.ipmicmd until login Wait until logged in to assign. This way we have confirmation that ipmicmd is viable before trying to use it. --- confluent_server/confluent/plugins/hardwaremanagement/ipmi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py b/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py index b4205ccc..52fe4533 100644 --- a/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py +++ b/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py @@ -345,7 +345,6 @@ class IpmiHandler(object): if ge[0] == -2: raise exc.TargetEndpointUnreachable(ge[1]) raise - self.ipmicmd = persistent_ipmicmds[(node, tenant)] bootdevices = { 'optical': 'cd' @@ -356,6 +355,7 @@ class IpmiHandler(object): self.broken = True self.error = response['error'] else: + self.ipmicmd = ipmicmd self.loggedin = True self.ipmicmd.setup_confluent_keyhandler() self._logevt.set()