Author: challngr
Date: Fri May  1 19:18:07 2015
New Revision: 1677215

URL: http://svn.apache.org/r1677215
Log:
UIMA-4358 More ssh cleanup.

Modified:
    uima/sandbox/uima-ducc/trunk/src/main/admin/ducc.py
    uima/sandbox/uima-ducc/trunk/src/main/admin/ducc_util.py

Modified: uima/sandbox/uima-ducc/trunk/src/main/admin/ducc.py
URL: 
http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/src/main/admin/ducc.py?rev=1677215&r1=1677214&r2=1677215&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/src/main/admin/ducc.py (original)
+++ uima/sandbox/uima-ducc/trunk/src/main/admin/ducc.py Fri May  1 19:18:07 2015
@@ -261,7 +261,7 @@ class Ducc(DuccUtil):
         or_parms = None
         single_user = False
         nodup = False           # we allow duplicates unless asked not to
-        localdate = 0
+        localdate = time.time()
 
         try:
            opts, args = getopt.getopt(argv, 'bc:d:n:o:sk?v', ['or_parms=', 
'nodup' ])

Modified: uima/sandbox/uima-ducc/trunk/src/main/admin/ducc_util.py
URL: 
http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/src/main/admin/ducc_util.py?rev=1677215&r1=1677214&r2=1677215&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/src/main/admin/ducc_util.py (original)
+++ uima/sandbox/uima-ducc/trunk/src/main/admin/ducc_util.py Fri May  1 
19:18:07 2015
@@ -178,7 +178,7 @@ class DuccUtil(DuccBase):
             print "Cannot determine if ActiveMq broker is alive."
             return false
 
-        lines = self.popen('ssh', self.broker_host, netstat, '-an')
+        lines = self.ssh(self.broker_host, True, netstat, '-an')
         #
         # look for lines like this with the configured port in the 4th token, 
and
         # ending with LISTEN:
@@ -206,8 +206,10 @@ class DuccUtil(DuccBase):
         CMD = CMD + ' ' + broker_name
         CMD = 'JAVA_HOME=' + self.java_home() + ' ' + CMD
         print '--------------------', CMD
-        self.ssh(broker_host, False, CMD)
-        pass
+        lines = self.ssh(broker_host, True, CMD)
+        for l in lines:
+            pass       # throw away junk from ssh
+
 
     def nohup(self, cmd, showpid=True):
         cmd = ' '.join(cmd)
@@ -548,7 +550,9 @@ class DuccUtil(DuccBase):
         return answer
 
     def kill_process(self, node, proc, signal):
-        self.ssh(node, False, 'kill', signal, proc[1])
+        lines = self.ssh(node, True, 'kill', signal, proc[1])
+        for l in lines:
+            pass # throw away the noise
                 
     def clean_shutdown(self):
         DUCC_JVM_OPTS = ' -Dducc.deploy.configuration=' + self.DUCC_HOME + 
"/resources/ducc.properties "


Reply via email to