aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xgo2
-rw-r--r--steuermann/hosts.ini10
-rw-r--r--steuermann/rexec.py6
-rw-r--r--steuermann/run.py3
-rw-r--r--steuermann/run_all.py10
5 files changed, 26 insertions, 5 deletions
diff --git a/go b/go
index c76b1de..9701840 100755
--- a/go
+++ b/go
@@ -1,6 +1,6 @@
#!/bin/sh
-n=4
+n=5
rm -rf build
diff --git a/steuermann/hosts.ini b/steuermann/hosts.ini
index d750134..af3a3b6 100644
--- a/steuermann/hosts.ini
+++ b/steuermann/hosts.ini
@@ -37,8 +37,8 @@ like=linux:csh
[solaris:csh]
like=linux:csh
-[windows:cmd]
-run=[ 'python', '-m', 'steuermann.windows_comm', '%(hostname)s', '%(script)s' ]
+[windows:xp]
+run=[ 'python', '-m', 'steuermann.rexec', '-d', '%(workdir)s', '-h', '%(hostname)s', '-p', 'pass', 'set w_node=%(w_node)s & set sm_run=%(runname)s & call bin\\steuermann_%(hostname)s & call %(script)s & call show_status %%errorlevel%%' ]
like=all
@@ -59,7 +59,6 @@ like=bond
[snow-leopard]
like=cadeau
-
; actual machines
[jwcalibdev]
@@ -132,6 +131,11 @@ like=solaris:csh
maxproc=1
workdir=/data/grail1/iraf/steuermann
+[vxp-dukat]
+hostname=vxp-dukat
+like=windows:xp
+maxproc=1
+workdir=c:/work
; There is a section [ALL] that is used with every machine name
[ALL]
diff --git a/steuermann/rexec.py b/steuermann/rexec.py
index 30e58dc..43aba01 100644
--- a/steuermann/rexec.py
+++ b/steuermann/rexec.py
@@ -43,7 +43,11 @@ def run( host, cmd, password, directory ):
print "HTTP ERROR",e.code
print e.read()
return 1
- print f.read()
+ while 1 :
+ s = f.read(2048)
+ if s == '' :
+ break
+ sys.stdout.write(s)
return 0
def upload( host, filename, password, directory) :
diff --git a/steuermann/run.py b/steuermann/run.py
index 77db2f1..36f7f59 100644
--- a/steuermann/run.py
+++ b/steuermann/run.py
@@ -128,6 +128,7 @@ class runner(object):
table=node.table,
cmd=node.cmd,
node=node.name,
+ w_node=node.name.replace("/","_").replace(":","_"),
runname=run_name,
)
@@ -328,9 +329,11 @@ def log_traceback() :
# strings. I want each line of output logged separately so the log
# file remains easy to process, so I reverse engineered this out of
# the logging module.
+ print "LOG TRACEBACK:"
try:
etype, value, tb = sys.exc_info()
tbex = traceback.extract_tb( tb )
+ print tbex
for filename, lineno, name, line in tbex :
print '%s:%d, in %s'%(filename,lineno,name)
if line:
diff --git a/steuermann/run_all.py b/steuermann/run_all.py
index b87ba7d..a097a1b 100644
--- a/steuermann/run_all.py
+++ b/steuermann/run_all.py
@@ -380,12 +380,21 @@ def run_all(xnodes, run_name, db) :
runner = run.runner( xnodes )
+ none_running = 0
+ # will count how many times through there was nothing running
while 1 :
( keep_running, no_sleep ) = run_step( runner, xnodes, run_name, db )
if not keep_running :
break
if not no_sleep :
+ if len(runner.all_procs) == 0 :
+ none_running += 1
+ if none_running > 5 :
+ print "No processes running - some prereq missing"
+ break
+ else :
+ none_running = 0
time.sleep(1)
#
@@ -443,6 +452,7 @@ def run_step( runner, xnodes, run_name, db ) :
else :
try :
tmp = runner.run(x, run_name, no_run=no_run, logfile_name = make_log_file_name(run_name, host, table, cmd) )
+ print "STARTED",x_name
except run.run_exception, e :
now = str(datetime.datetime.now())
db.execute("UPDATE sm_status SET start_time=?, end_time=?, status='E', notes=? WHERE ( run=? AND host=? AND tablename=? AND cmd=? )",