mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-22 01:22:00 +00:00
Have consoles meaningfully retried to see if the target is reconfigured
Previously, if a username or password was bad, retry would not occur. Correct this such that every so often or right when someone connects, the target is checked to see if the user/password is now considered good.
This commit is contained in:
parent
e4d0cb8207
commit
db456dd9e5
2
TODO
2
TODO
@ -37,6 +37,4 @@ Traceback (most recent call last):
|
||||
KeyError: ''
|
||||
|
||||
|
||||
-reuse SDR to make health faster
|
||||
-have pyghmi and friends do multiprocessing pools (particularly the PBKDF stuff in auth)
|
||||
-bad password retrie
|
||||
|
@ -107,7 +107,6 @@ class _ConsoleHandler(object):
|
||||
|
||||
def _got_disconnected(self):
|
||||
self.connecstate = 'unconnected'
|
||||
eventlet.spawn(self._send_disconnect_events)
|
||||
self._send_rcpts({'connectstate': self.connectstate})
|
||||
self._connect()
|
||||
|
||||
@ -243,10 +242,8 @@ class _ConsoleHandler(object):
|
||||
return (retdata + str(self.buffer[-1024:]), connstate)
|
||||
|
||||
def write(self, data):
|
||||
#TODO.... take note of data coming in from audit/log perspective?
|
||||
#or just let echo take care of it and then we can skip this stack
|
||||
#level?
|
||||
self._console.write(data)
|
||||
if self.connectstate == 'connected':
|
||||
self._console.write(data)
|
||||
|
||||
|
||||
def connect_node(node, configmanager):
|
||||
|
@ -104,14 +104,12 @@ class IpmiConsole(conapi.Console):
|
||||
def handle_data(self, data):
|
||||
if type(data) == dict:
|
||||
disconnect = frozenset(('Session Disconnected', 'timeout'))
|
||||
if 'error' in data and data['error'] in disconnect:
|
||||
if 'error' in data:
|
||||
self.solconnection = None
|
||||
self.broken = True
|
||||
self.error = data['error']
|
||||
if self.connected:
|
||||
self.datacallback(conapi.ConsoleEvent.Disconnect)
|
||||
else:
|
||||
raise Exception("Unrecognized pyghmi input %s" % repr(data))
|
||||
else:
|
||||
self.datacallback(data)
|
||||
|
||||
@ -134,6 +132,7 @@ class IpmiConsole(conapi.Console):
|
||||
break
|
||||
if self.broken:
|
||||
raise exc.TargetEndpointUnreachable(self.error)
|
||||
self.connected = True
|
||||
except socket.gaierror as err:
|
||||
raise exc.TargetEndpointUnreachable(str(err))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user