You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ts...@apache.org on 2012/12/14 00:58:55 UTC
git commit: marvin: remoteSSHclient logs
Updated Branches:
refs/heads/master 6f29317a8 -> fb5ea25a4
marvin: remoteSSHclient logs
Adding logging for commands sent, and executed with results returned
frmo the remote host.
Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/fb5ea25a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/fb5ea25a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/fb5ea25a
Branch: refs/heads/master
Commit: fb5ea25a4d50f4530fcf535d66d7b38e53612e00
Parents: 6f29317
Author: Prasanna Santhanam <ts...@apache.org>
Authored: Thu Dec 13 15:57:59 2012 -0800
Committer: Prasanna Santhanam <ts...@apache.org>
Committed: Thu Dec 13 15:58:36 2012 -0800
----------------------------------------------------------------------
tools/marvin/marvin/remoteSSHClient.py | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/fb5ea25a/tools/marvin/marvin/remoteSSHClient.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/remoteSSHClient.py b/tools/marvin/marvin/remoteSSHClient.py
index 036e1c3..24ba0fe 100644
--- a/tools/marvin/marvin/remoteSSHClient.py
+++ b/tools/marvin/marvin/remoteSSHClient.py
@@ -19,6 +19,7 @@ import paramiko
import time
import cloudstackException
import contextlib
+import logging
from contextlib import closing
class remoteSSHClient(object):
@@ -34,6 +35,7 @@ class remoteSSHClient(object):
while True:
try:
self.ssh.connect(str(host),int(port), user, passwd)
+ logging.debug("[SSHClient] connecting to server %s @ port % with user:passwd %s:%s"%(str(host), port, user, passwd))
except paramiko.SSHException, sshex:
if retry_count == 0:
raise cloudstackException.InvalidParameterException(repr(sshex))
@@ -46,6 +48,7 @@ class remoteSSHClient(object):
def execute(self, command):
stdin, stdout, stderr = self.ssh.exec_command(command)
+ logging.debug("[SSHClient] sending command %s to host"%(command, str(self.host)))
output = stdout.readlines()
errors = stderr.readlines()
results = []
@@ -57,7 +60,7 @@ class remoteSSHClient(object):
else:
for strOut in output:
results.append(strOut.rstrip())
-
+ logging.debug("[SSHClient] command %s returned %s"%(command, results))
return results
def scp(self, srcFile, destPath):