2
0
mirror of https://github.com/xcat2/confluent.git synced 2025-01-28 11:57:37 +00:00

Fix inability to notice underlying broken layers of the SOL

Through an unknown set of circumstances, an solconnection could be
stuck 'connecting'.  In every case analyzed, the ipmi_session was
broken.  Use that to detect a class of failure and react appropriately.
This commit is contained in:
Jarrod Johnson 2018-08-07 15:12:53 -04:00
parent ecbe1a86b1
commit de58593f14

View File

@ -270,17 +270,20 @@ class IpmiConsole(conapi.Console):
kg=self.kg, force=True,
iohandler=self.handle_data)
self.solconnection.outputlock = NullLock()
while not self.solconnection.connected and not self.broken:
while (not self.solconnection.connected and
not (self.broken or self.solconnection.connected or
self.solconnection.ipmi_session.broken)):
w = eventlet.event.Event()
_ipmiwaiters.append(w)
w.wait()
if self.broken:
break
if self.broken:
w.wait(15)
if (self.broken or self.solconnection.connected or
self.solconnection.ipmi_session.broken):
if (self.error.startswith('Incorrect password') or
self.error.startswith('Unauthorized name')):
raise exc.TargetEndpointBadCredentials
else:
if not self.error:
self.error = 'Unknown error'
raise exc.TargetEndpointUnreachable(self.error)
self.connected = True
except socket.gaierror as err: