cas | 24 +++---------------------
cas-admin | 31 +++++++------------------------
cas.spec | 6 +++---
3 files changed, 13 insertions(+), 48 deletions(-)
New commits:
commit d91d764b5e51eb8789506e7f687398feae4e610d
Author: adam stokes <uzr(a)jak.rebo>
Date: Tue Sep 15 11:20:57 2009 -0400
- begin ripping out func code.
diff --git a/cas b/cas
index b6d20cc..f69b68b 100755
--- a/cas
+++ b/cas
@@ -252,12 +252,9 @@ class CasApplication(object):
self.casLog.debug("crash problem: err: %s, out: %s" % (err,
out))
else:
# The machine running cas isn't capable of processing this core, lets
- # attempt with Func. Assuming Func is installed and a server database
+ # attempt with paramiko. Assuming paramiko is installed and a server
database
# is configured we attempt to process the core at another machine.
try:
- import func.overlord.client as fc
- import func.jobthing as jobthing
- from time import sleep
self.casLog.info("Crash file built, locating suitable %s system for
" \
"processing" % (debugKernelArch,))
serverList = self.db.getServers()
@@ -269,22 +266,7 @@ class CasApplication(object):
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)
- # 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)
+ # TODO: run command through paramiko
else:
self.casLog.info("No servers available for arch and current
system not "\
"suitable for processing, please run cas-admin -h
" \
@@ -294,7 +276,7 @@ class CasApplication(object):
"more information"))
except ImportError:
self.casLog.info("Current running machine is not suitable for
processing this core " \
- "and
http://fedorahosted.org/func is not installed/configured
properly.")
+ "and python-paramiko is not installed/configured
properly.")
self.casLog.info("Finishing job without processing the core, please
find a suitable %s "\
"machine in order to view this core in crash." %
(debugKernelArch,))
crashOutFile = os.path.join(self.storagePath,"modules")
diff --git a/cas-admin b/cas-admin
index 2e575d8..c51ba15 100755
--- a/cas-admin
+++ b/cas-admin
@@ -113,32 +113,15 @@ class CasServerHandler(object):
try:
serverList = {}
hostname_count = 0
- # Attempt to load func to automate detection of machine arch
- import func.overlord.client as fc
- parent_func = fc.Overlord("*")
- minions = parent_func.minions
- for i in minions:
- scheme, netloc, path, query, frag = urlparse.urlsplit(i)
- hostname, port = netloc.split(":")
- client = fc.Overlord(hostname)
- isClientReachable = client.run("test","ping", [])
- if isClientReachable == 1:
- # Returns as
{"hostname":['sts','stdout','stderr']}
- # what a pain
- client_dict = client.command.run("/bin/uname -m")
- # silly magic to get output from command module
- # since we are doing one host at a time we just pull the first
- # key from the dict and parse its return
- sts, arch, err = client_dict[client_dict.keys()[0]]
- if sts:
- self.casLog.debug(err)
- # clean up arch string
- arch = arch.strip()
- self.db.addServer(hostname, arch)
- hostname_count = hostname_count + 1
+ # Attempt to load paramiko to automate detection of machine arch
+ # import func.overlord.client as fc
+ # TODO: add interactive session for adding servers, and also
+ # add ability to script this
+ # self.db.addServer(hostname, arch)
+ # hostname_count = hostname_count + 1
self.casLog.info("Server database built with %d server(s) added." %
(hostname_count,))
except ImportError:
- raise SystemExit(self.casLog.debug("Please install func
(
http://fedorahosted.org/func) for " \
+ raise SystemExit(self.casLog.debug("Please install python-paramiko for
" \
"an automated machine arch population.\n"))
return
diff --git a/cas.spec b/cas.spec
index 462ae10..3cf34df 100644
--- a/cas.spec
+++ b/cas.spec
@@ -2,8 +2,8 @@
Name: cas
Summary: Tool to analyze and configure core file environment
-Version: 0.14
-Release: 10%{?dist}
+Version: 0.15
+Release: 1%{?dist}
Source0:
https://fedorahosted.org/releases/c/a/cas/%{name}-%{version}.tar.gz
License: GPLv3+
Group: Development/Libraries
@@ -14,7 +14,7 @@ BuildRequires: python-devel
%if 0%{?rhel}
Requires: python-sqlite crash
%else
-Requires: crash
+Requires: crash python-paramiko
%endif
%description