cas | 28 +++++++++++++++-------------
1 file changed, 15 insertions(+), 13 deletions(-)
New commits:
commit bc4b5b97b94693a99466ecf71af08bb058cf0d01
Author: uzr <uzr(a)shinzo.(none)>
Date: Tue Apr 28 20:24:57 2009 -0400
- test if defined func minion is reachable
diff --git a/cas b/cas
index 269fb9f..412667e 100755
--- a/cas
+++ b/cas
@@ -267,24 +267,26 @@ class CasApplication(object):
for hostname, arch in serverList:
if arch == debugKernelArch:
# TODO: Randomize server selection
- # TODO: Verify remote server is reachable
casProcessMachine = hostname
self.casLog.info("Machine %s found, processing " \
"crash output" %
(casProcessMachine,))
cmd = "cd " + os.path.join(self.storagePath) +
" && ./crash -i crash.in > crash.out"
client = fc.Overlord(casProcessMachine,async=True)
- job_id = client.command.run(cmd)
- while True:
- status = client.job_status(job_id)
- (code, results) = status
- if code == jobthing.JOB_ID_RUNNING:
- self.casLog.status("task is running...")
- elif code == jobthing.JOB_ID_PARTIAL:
- self.casLog.status("task is running...")
- elif code == jobthing.JOB_ID_FINISHED:
- self.casLog.status("task complete; results =
%s" % (results,))
- break
- sleep(5)
+ # test if client is reachable
+ isClientReachable = client.run("test",
"ping", [])
+ if isClientReachable == 1:
+ job_id = client.command.run(cmd)
+ while True:
+ status = client.job_status(job_id)
+ (code, results) = status
+ if code == jobthing.JOB_ID_RUNNING:
+ self.casLog.status("task is
running...")
+ elif code == jobthing.JOB_ID_PARTIAL:
+ self.casLog.status("task is
running...")
+ elif code == jobthing.JOB_ID_FINISHED:
+ self.casLog.status("task complete; results =
%s" % (results,))
+ break
+ sleep(5)
else:
self.casLog.info("No servers available for arch and current
system not "\
"suitable for processing, please run cas-admin -h
" \
Show replies by date