diff --git a/confluent_server/aiohmi/ipmi/private/session.py b/confluent_server/aiohmi/ipmi/private/session.py index 746c958e..0725fdf3 100644 --- a/confluent_server/aiohmi/ipmi/private/session.py +++ b/confluent_server/aiohmi/ipmi/private/session.py @@ -1623,7 +1623,7 @@ class Session(object): givenhash = struct.pack("%dB" % hashlen, *data[40:hashlen + 40]) if givenhash != expectedhash: self.sessioncontext = "FAILED" - self.onlogon({'error': "Incorrect password provided"}) + await self.onlogon({'error': "Incorrect password provided"}) return -9 # We have now validated that the BMC and client agree on password, time # to store the keys diff --git a/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py b/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py index d711679a..04894407 100644 --- a/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py +++ b/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py @@ -353,7 +353,7 @@ class IpmiConsole(conapi.Console): self.error = 'Unknown error' if (self.error.startswith('Incorrect password') or self.error.startswith('Unauthorized name')): - raise exc.TargetEndpointBadCredentials + raise exc.TargetEndpointBadCredentials() else: raise exc.TargetEndpointUnreachable(self.error) self.connected = True @@ -445,6 +445,8 @@ async def perform_request(operator, node, element, excmsg = str(ipmiexc) if excmsg in ('Session no longer connected', 'timeout'): await results.put(msg.ConfluentTargetTimeout(node)) + elif 'Unauthorized name' in excmsg or 'Incorrect password provided' in excmsg: + await results.put(msg.ConfluentTargetInvalidCredentials(node)) else: await results.put(msg.ConfluentNodeError(node, excmsg)) #raise