2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-22 01:22:00 +00:00

Fix shell execution on node removal

This commit is contained in:
Jarrod Johnson 2014-05-29 10:28:04 -04:00
parent 6e2808f63e
commit a7398198d4
3 changed files with 7 additions and 2 deletions

1
TODO
View File

@ -35,3 +35,4 @@ KeyError: ''
why python 2.7 with excessive select() would transpose typing so badly...
while the problem cannot be reproduced without that problem fixed, the
problem should only cause poor performance, not induce transpose of data...
-passphrase lost on restart of service?

View File

@ -37,6 +37,7 @@ _genwatchattribs = frozenset(('console.method', 'console.logging'))
_tracelog = None
class _ConsoleHandler(object):
def __init__(self, node, configmanager):
self._dologging = True
@ -47,6 +48,7 @@ class _ConsoleHandler(object):
self.node = node
self.connectstate = 'unconnected'
self.clientcount = 0
self._isalive = True
self.logger = log.Logger(node, console=True,
tenant=configmanager.tenant)
self.buffer = bytearray()
@ -208,9 +210,11 @@ class _ConsoleHandler(object):
logdata='console disconnected', ltype=log.DataTypes.event,
event=log.Events.consoledisconnect)
self._send_rcpts({'connectstate': self.connectstate})
self._connect()
if self._isalive:
self._connect()
def close(self):
self._isalive = False
self._send_rcpts({'deleting': True})
self._disconnect()
if self._console:

View File

@ -96,7 +96,7 @@ class ExecConsole(conapi.Console):
return
self.subproc.terminate()
waittime = 10
while self.subproc is not None or self.subproc.poll() is None:
while self.subproc is not None and self.subproc.poll() is None:
eventlet.sleep(1)
waittime -= 1
if waittime == 0: