diff --git a/confluent_server/confluent/consoleserver.py b/confluent_server/confluent/consoleserver.py index 293b82f6..54789374 100644 --- a/confluent_server/confluent/consoleserver.py +++ b/confluent_server/confluent/consoleserver.py @@ -442,6 +442,9 @@ class ConsoleHandler(object): if self.connectionthread: self.connectionthread.kill() self.connectionthread = None + if self._attribwatcher: + self.cfgmgr.remove_watcher(self._attribwatcher) + self._attribwatcher = None def get_console_output(self, data): # Spawn as a greenthread, return control as soon as possible diff --git a/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py b/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py index 8bec4727..d59ee2bd 100644 --- a/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py +++ b/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py @@ -292,6 +292,7 @@ class IpmiConsole(conapi.Console): self.solconnection.out_handler = _donothing self.solconnection.close() self.solconnection = None + self.datacallback = None self.broken = True self.error = "closed" diff --git a/confluent_server/confluent/plugins/shell/ssh.py b/confluent_server/confluent/plugins/shell/ssh.py index 1c6b6182..045912de 100644 --- a/confluent_server/confluent/plugins/shell/ssh.py +++ b/confluent_server/confluent/plugins/shell/ssh.py @@ -63,6 +63,7 @@ class SshShell(conapi.Console): def __init__(self, node, config, username='', password=''): self.node = node self.ssh = None + self.datacallback = None self.nodeconfig = config self.username = username self.password = password @@ -155,6 +156,7 @@ class SshShell(conapi.Console): def close(self): if self.ssh is not None: self.ssh.close() + self.datacallback = None def create(nodes, element, configmanager, inputdata): if len(nodes) == 1: diff --git a/confluent_server/confluent/shellmodule.py b/confluent_server/confluent/shellmodule.py index 08b6a8ef..5b7e44e3 100644 --- a/confluent_server/confluent/shellmodule.py +++ b/confluent_server/confluent/shellmodule.py @@ -116,6 +116,7 @@ class ExecConsole(conapi.Console): break if self.subproc is not None and self.subproc.poll() is None: self.subproc.kill() + self._datacallback = None class Plugin(object):