From f6edeae388371dcecf37d900b82f08dc98332b21 Mon Sep 17 00:00:00 2001 From: John Hamilton Date: Thu, 8 Oct 2015 16:33:24 -0500 Subject: [PATCH] Zencommand tasks get stuck ZEN-19208 Back-porting two more PRs to address this issue: https://github.com/zenoss/zenoss-prodbin/pull/1088 https://github.com/zenoss/zenoss-prodbin/pull/1092 --- Products/DataCollector/CollectorClient.py | 2 +- Products/DataCollector/SshClient.py | 2 +- Products/ZenRRD/zencommand.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Products/DataCollector/CollectorClient.py b/Products/DataCollector/CollectorClient.py index 7b81f9733c..02e1a513db 100644 --- a/Products/DataCollector/CollectorClient.py +++ b/Products/DataCollector/CollectorClient.py @@ -172,7 +172,7 @@ def commandsFinished(self): return len(self.results) == len(self._commands) - def clientFinished(self): + def clientFinished(self, error=None): """ Tell the datacollector that we are all done """ diff --git a/Products/DataCollector/SshClient.py b/Products/DataCollector/SshClient.py index 1ea0f19d93..a3b0b65a3e 100644 --- a/Products/DataCollector/SshClient.py +++ b/Products/DataCollector/SshClient.py @@ -439,7 +439,7 @@ def serviceStopped(self, *args, **kwargs): else: msg = "SSH authentication failed - no password or public key specified" self._handleFailure(msg, event_key="sshClientAuth") - self.factory.clientFinished(msg) + self.factory.clientFinished(LoginFailed(msg)) else: sendEvent(self, "Authentication succeeded for username %s" % self.user, severity=Event.Clear, event_key="sshClientAuth") diff --git a/Products/ZenRRD/zencommand.py b/Products/ZenRRD/zencommand.py index 7041c79b19..e76eb84e8f 100644 --- a/Products/ZenRRD/zencommand.py +++ b/Products/ZenRRD/zencommand.py @@ -219,9 +219,9 @@ def clientConnectionFailed(self, connector, reason): """ msg = reason.getErrorMessage() if self.connect_defer and not self.connect_defer.called: - self.connect_defer.errback(msg) + self.connect_defer.errback(reason) if self.close_defer and not self.close_defer.called: - self.close_defer.errback(msg) + self.close_defer.errback(reason) self.clientFinished()