2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-09-04 12:07:58 +00:00

Fix behavior with IPMI bad user/password

This commit is contained in:
Jarrod Johnson
2026-06-30 15:17:45 -04:00
parent 5abd080ba2
commit fbec09c073
2 changed files with 4 additions and 2 deletions
@@ -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
@@ -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