Branch 'devel' - Makefile
by Adam Stokes
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 2fb868cd1564fcaf87d3650d67c454982e326745
Author: adam stokes <astokes(a)fedoraproject.org>
Date: Mon Apr 26 20:38:03 2010 -0400
clean cas.conf.5.gz
diff --git a/Makefile b/Makefile
index e730acf..76d0b9b 100644
--- a/Makefile
+++ b/Makefile
@@ -60,7 +60,7 @@ rpm: clean $(NAME)-$(VERSION).tar.gz
clean:
rm -rfv {dist,build}
- rm -rf *.\~* cas.1.gz cas-admin.1.gz
+ rm -rf *.\~* cas.1.gz cas-admin.1.gz cas.conf.5.gz
rm -rf $(RPM_BUILD_DIR)
rm -rf MANIFEST
for i in `find . -iname *.pyc`; do \
13 years, 11 months
Branch 'devel' - Makefile
by Adam Stokes
Makefile | 3 +++
1 file changed, 3 insertions(+)
New commits:
commit 296200ab4e42317422c94aab897faae801743028
Author: adam stokes <astokes(a)fedoraproject.org>
Date: Mon Apr 26 19:50:40 2010 -0400
update makefile for cas.conf
diff --git a/Makefile b/Makefile
index 8e41c4a..e730acf 100644
--- a/Makefile
+++ b/Makefile
@@ -27,15 +27,18 @@ build:
install:
mkdir -p $(DESTDIR)/usr/bin
mkdir -p $(DESTDIR)/usr/share/man/man1
+ mkdir -p $(DESTDIR)/usr/share/man/man5
mkdir -p $(DESTDIR)/var/lib/cas/snippets
mkdir -p $(DESTDIR)/usr/share/$(NAME)/tests
mkdir -p $(DESTDIR)/etc
gzip -c man/en/cas.1 > cas.1.gz
gzip -c man/en/cas-admin.1 > cas-admin.1.gz
+ gzip -c man/en/cas.conf.5 > cas.conf.5.gz
install -m755 cas $(DESTDIR)/usr/bin/cas
install -m755 cas-admin $(DESTDIR)/usr/bin/cas-admin
install -m644 cas.1.gz $(DESTDIR)/usr/share/man/man1/.
install -m644 cas-admin.1.gz $(DESTDIR)/usr/share/man/man1/.
+ install -m644 cas.conf.5.gz $(DESTDIR)/usr/share/man/man5/.
install -m644 AUTHORS LICENSE README $(DESTDIR)/usr/share/$(NAME)/.
install -m644 $(NAME).conf $(DESTDIR)/etc/$(NAME).conf
for d in $(SUBDIRS); do make DESTDIR=`cd $(DESTDIR); pwd` -C $$d install; [ $$? = 0 ] || exit 1 ; done
13 years, 11 months
Branch 'devel' - overseer/command.py
by Adam Stokes
overseer/command.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit a7baf9d7bb7edd1ce5305dfe226791a950b8b17d
Author: adam stokes <astokes(a)fedoraproject.org>
Date: Mon Apr 26 15:04:35 2010 -0400
.
diff --git a/overseer/command.py b/overseer/command.py
index 8d75b23..a750669 100644
--- a/overseer/command.py
+++ b/overseer/command.py
@@ -14,7 +14,7 @@
import cherrypy
import simplejson as json
import ConfigParser
-import datetime
+from datetime import datetime
import urlgrabber.grabber as grabber
from caslib.db import CasStorage
13 years, 11 months
Branch 'devel' - overseer/command.py
by Adam Stokes
overseer/command.py | 3 +++
1 file changed, 3 insertions(+)
New commits:
commit bf8d1dded9bd85cd561f2cff279be15bf806a044
Author: adam stokes <astokes(a)fedoraproject.org>
Date: Mon Apr 26 14:55:00 2010 -0400
entry point
diff --git a/overseer/command.py b/overseer/command.py
index c2ea539..8d75b23 100644
--- a/overseer/command.py
+++ b/overseer/command.py
@@ -55,3 +55,6 @@ def main():
root.admin = Admin()
cherrypy.server.socket_port = 8112
cherrypy.quickstart(root)
+
+if __name__=="__main__":
+ main()
13 years, 11 months
Branch 'devel' - overseer/command.py
by Adam Stokes
overseer/command.py | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
New commits:
commit f3d9e410daa966668de6609e3404146f47b54a1e
Author: adam stokes <astokes(a)fedoraproject.org>
Date: Mon Apr 26 14:53:43 2010 -0400
working on rest interface to jobs
diff --git a/overseer/command.py b/overseer/command.py
index 84d2e9d..c2ea539 100644
--- a/overseer/command.py
+++ b/overseer/command.py
@@ -18,6 +18,9 @@ import datetime
import urlgrabber.grabber as grabber
from caslib.db import CasStorage
+class Admin:
+ pass
+
class Delegate:
def __init__(self):
cfg = ConfigParser.ConfigParser()
@@ -47,4 +50,8 @@ class Delegate:
""" Return job status """
pass
-cherrypy.quickstart(Delegate())
+def main():
+ root = Delegate()
+ root.admin = Admin()
+ cherrypy.server.socket_port = 8112
+ cherrypy.quickstart(root)
13 years, 11 months
Branch 'devel' - cas.spec
by Adam Stokes
cas.spec | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 187e1801dd8b7639e163c86ee6b284b0e039fd56
Author: adam stokes <astokes(a)fedoraproject.org>
Date: Mon Apr 26 14:32:40 2010 -0400
fix requires
diff --git a/cas.spec b/cas.spec
index 7d7cef9..e40ffe6 100644
--- a/cas.spec
+++ b/cas.spec
@@ -19,8 +19,8 @@ Requires: python-paramiko
Requires: xz
Requires: crash
Requires: python-cherrypy
-Requires: simplejson
-Requires: urlgrabber
+Requires: python-simplejson
+Requires: python-urlgrabber
%description
CAS provides a user the ability to configure an environment for core analysis
13 years, 11 months
Branch 'devel' - 2 commits - caslib/db.py cas.spec overseer/command.py overseer/__init__.py restful/restful.pl
by Adam Stokes
cas.spec | 9 +++++++--
caslib/db.py | 2 +-
overseer/command.py | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
restful/restful.pl | 33 ---------------------------------
4 files changed, 58 insertions(+), 36 deletions(-)
New commits:
commit 3272de9f6be2e34b1a393a45a092414f10678ad6
Author: adam stokes <astokes(a)fedoraproject.org>
Date: Mon Apr 26 14:28:42 2010 -0400
pushing out cherrypy handler
diff --git a/cas.spec b/cas.spec
index c77f6a4..7d7cef9 100644
--- a/cas.spec
+++ b/cas.spec
@@ -12,10 +12,15 @@ BuildArch: noarch
Url: http://fedorahosted.org/cas
BuildRequires: python-devel
%if 0%{?rhel}
-Requires: python-sqlite crash python-paramiko xz
+Requires: python-sqlite python-paramiko
%else
-Requires: crash python-paramiko xz
+Requires: python-paramiko
%endif
+Requires: xz
+Requires: crash
+Requires: python-cherrypy
+Requires: simplejson
+Requires: urlgrabber
%description
CAS provides a user the ability to configure an environment for core analysis
diff --git a/caslib/db.py b/caslib/db.py
index f88c37b..43582b2 100644
--- a/caslib/db.py
+++ b/caslib/db.py
@@ -95,7 +95,7 @@ class CasStorage(object):
# JOB METHODS
def getAllJobs(self):
- """ all jobs """
+ """ return all current running jobs """
self.cursor.execute('SELECT * FROM jobs')
return self.cursor.fetchall()
diff --git a/overseer/__init__.py b/overseer/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/overseer/command.py b/overseer/command.py
new file mode 100644
index 0000000..84d2e9d
--- /dev/null
+++ b/overseer/command.py
@@ -0,0 +1,50 @@
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+import cherrypy
+import simplejson as json
+import ConfigParser
+import datetime
+import urlgrabber.grabber as grabber
+from caslib.db import CasStorage
+
+class Delegate:
+ def __init__(self):
+ cfg = ConfigParser.ConfigParser()
+ cfg.read("/etc/cas.conf")
+ db_file = cfg.get("settings", "database")
+ self.db = CasStorage(db_file)
+
+ @cherrypy.expose
+ def index(self):
+ """ Catchall call; returns current running jobs """
+ return json.dumps(self.db.getAllJobs())
+
+ @cherrypy.expose
+ def create(self, vmcore, email):
+ """ Create job """
+ datenow = datetime.now()
+ dateFormatted = datenow.strftime("%Y.%m.%d.%I.%M.%S")
+ try:
+ grabber(vmcore)
+ except grabber.URLGrabError, e:
+ return json.dumps(e)
+ self.db.addJob(id, dateFormatted, email)
+ return json.dumps(id)
+
+ @cherrypy.expose
+ def status(self, id):
+ """ Return job status """
+ pass
+
+cherrypy.quickstart(Delegate())
commit e2db183679a65df51f487b5091d04e98c5833e8f
Author: adam stokes <astokes(a)fedoraproject.org>
Date: Mon Apr 26 14:02:14 2010 -0400
rm restful
diff --git a/restful/restful.pl b/restful/restful.pl
deleted file mode 100755
index a62bee9..0000000
--- a/restful/restful.pl
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/usr/bin/perl
-use 5.010;
-use strict;
-use warnings;
-use CGI qw(:standard);
-use JSON;
-use Config::IniFiles;
-use Data::Dumper;
-
-# setup json
-my $json = JSON->new->allow_nonref;
-
-# location of CAS configuration file
-my $cas_conf = "/etc/cas.conf";
-
-# load configuration
-my $cfg = new Config::IniFiles( -file => $cas_conf ) or die "Can not load config";
-
-# start access to web service
-my %actions = map {$_=>1} param('action');
-
-if ($actions{jobs}) {
- print header('application/json');
- job();
-}
-
-print header();
-
-sub job {
- my @t_array = qw(hi test name wtf);
- print $json->to_json(\@t_array);
- exit 0;
-}
13 years, 11 months
caslib/util.py man/en
by Adam Stokes
caslib/util.py | 27 ++--------------------
man/en/cas.conf.5 | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 67 insertions(+), 24 deletions(-)
New commits:
commit 564be236aa7bf4ca5e88332b48ec17c0f6dd35cd
Author: adam stokes <astokes(a)fedoraproject.org>
Date: Mon Apr 26 12:23:00 2010 -0400
Merge a few changes from devel
diff --git a/caslib/util.py b/caslib/util.py
index 3abbeab..5346de4 100644
--- a/caslib/util.py
+++ b/caslib/util.py
@@ -11,8 +11,6 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-import cPickle
-import commands
import os
import re
import sys
@@ -26,7 +24,7 @@ else:
import shutil
def genprint(txt):
- sys.stdout.write("[.cas.] :: %s\n" % (txt,))
+ sys.stdout.write(":: %s\n" % (txt,))
sys.stdout.flush()
class Logging(object):
@@ -54,12 +52,12 @@ class Logging(object):
def debug(self, msg):
if self.debug_level == 'DEBUG':
- self.log.debug("[.cas.][debug] :: %s" % (msg,))
+ self.log.debug("debug :: %s" % (msg,))
def info(self, msg):
""" function to print procedure
"""
- self.log.info("[.cas.] :: %s" % (msg,))
+ self.log.info(":: %s" % (msg,))
class UtilException(Exception): pass
@@ -102,25 +100,6 @@ class UtilBase(object):
os.chmod(fn, newmode)
return
- def save(self, obj, fname):
- ''' push data to pickle
- '''
- FILE=open(fname, 'w')
- cPickle.dump(obj, FILE)
- FILE.close()
- return
-
- def load(self, fname):
- ''' grab data from pickle file
- '''
- if os.path.isfile(fname):
- FILE=open(fname, 'r')
- out=cPickle.load(FILE)
- FILE.close()
- else:
- raise UtilException("%s : Unable to locate/load file." % (fname,))
- return out
-
def getElfArch(self, debug):
""" determine machine type for ELF file
"""
diff --git a/man/en/cas.conf.5 b/man/en/cas.conf.5
new file mode 100644
index 0000000..10a301e
--- /dev/null
+++ b/man/en/cas.conf.5
@@ -0,0 +1,64 @@
+.TH "cas.conf" "5" "CAS" "cas configuration file"
+.SH NAME
+cas.conf \- Cas configuration file.
+.SH DESCRIPTION
+.sp
+cas.conf is the configuration file for cas.
+.SH [settings] OPTIONS
+.sp
+.in
+.B casuser
+User to run cas as.
+.in
+.B sshkey
+Used when deploying cas over several systems via ssh
+.in
+.B kernels
+Location of debug kernels
+.in
+.B rpmFilter
+Regular expression syntax when searching for kernels
+.in
+.B debugs
+Temporary storage for extracting debug information
+.in
+.B debugLevel
+Debug level for logging (DEBUG, INFO)
+.in
+.B workDirectory
+Work directory
+.in
+.B smtphost
+Mail server for notifications
+.in
+.B database
+Locate for database
+.in
+.B notify
+Receive notifications of core progress and result
+.SH [maintenance] OPTIONS
+.sp
+.in
+.B purgeLimit
+Time frame to keep data (days)
+.in
+.B autoPurge
+Autopurge data when cas-admin is run
+.SH [advanced] OPTIONS
+.sp
+.in
+.B crash_32
+Used when running a x86_64 and wanting to analyze a x86 core
+.in
+.B buffersize
+Buffersize for reading in a core file
+.SH FILES
+.sp
+/etc/cas.conf
+.SH "SEE ALSO"
+.sp
+cas(1)
+.in
+cas-admin(1)
+.in
+Full documentation located in /usr/share/doc/cas-<version>.
13 years, 11 months
Branch 'devel' - caslib/util.py cas.spec
by Adam Stokes
cas.spec | 13 +++++++++----
caslib/util.py | 27 +++------------------------
2 files changed, 12 insertions(+), 28 deletions(-)
New commits:
commit 3daa6b23c62b0567c8a5ba90a71b742cf861da07
Author: adam stokes <astokes(a)fedoraproject.org>
Date: Mon Apr 26 12:19:16 2010 -0400
rm makefile from snippets dir
cleanup unused methods
diff --git a/cas.spec b/cas.spec
index abe837b..c77f6a4 100644
--- a/cas.spec
+++ b/cas.spec
@@ -2,7 +2,7 @@
Name: cas
Summary: Tool to analyze and configure core file environment
-Version: 0.16
+Version: 0.17
Release: 0%{?dist}
Source0: https://fedorahosted.org/releases/c/a/cas/%{name}-%{version}.tar.gz
License: GPLv3+
@@ -12,9 +12,9 @@ BuildArch: noarch
Url: http://fedorahosted.org/cas
BuildRequires: python-devel
%if 0%{?rhel}
-Requires: python-sqlite crash python-paramiko bzip2
+Requires: python-sqlite crash python-paramiko xz
%else
-Requires: crash python-paramiko bzip2
+Requires: crash python-paramiko xz
%endif
%description
@@ -31,6 +31,7 @@ make
%install
rm -rf ${RPM_BUILD_ROOT}
make DESTDIR=${RPM_BUILD_ROOT} install
+rm -rf ${RPM_BUILD_ROOT}/var/lib/cas/snippets/Makefile
%clean
rm -rf ${RPM_BUILD_ROOT}
@@ -48,7 +49,11 @@ rm -rf ${RPM_BUILD_ROOT}
%doc AUTHORS LICENSE README PKG-INFO doc/*
%changelog
-* Fri Apr 16 2020 Adam Stokes <ajs at redhat dot com> - 0.16
+* Mon Apr 26 2010 Adam Stokes <ajs at redhat dot com> - 0.17
+- Add cas.conf man page
+- Fix typo in 'smtphost' configuration parameter
+
+* Fri Apr 16 2010 Adam Stokes <ajs at redhat dot com> - 0.16
- Release bump
- Fix inconsistencies with compression/core analysis
- Installer updates
diff --git a/caslib/util.py b/caslib/util.py
index 3abbeab..5346de4 100644
--- a/caslib/util.py
+++ b/caslib/util.py
@@ -11,8 +11,6 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-import cPickle
-import commands
import os
import re
import sys
@@ -26,7 +24,7 @@ else:
import shutil
def genprint(txt):
- sys.stdout.write("[.cas.] :: %s\n" % (txt,))
+ sys.stdout.write(":: %s\n" % (txt,))
sys.stdout.flush()
class Logging(object):
@@ -54,12 +52,12 @@ class Logging(object):
def debug(self, msg):
if self.debug_level == 'DEBUG':
- self.log.debug("[.cas.][debug] :: %s" % (msg,))
+ self.log.debug("debug :: %s" % (msg,))
def info(self, msg):
""" function to print procedure
"""
- self.log.info("[.cas.] :: %s" % (msg,))
+ self.log.info(":: %s" % (msg,))
class UtilException(Exception): pass
@@ -102,25 +100,6 @@ class UtilBase(object):
os.chmod(fn, newmode)
return
- def save(self, obj, fname):
- ''' push data to pickle
- '''
- FILE=open(fname, 'w')
- cPickle.dump(obj, FILE)
- FILE.close()
- return
-
- def load(self, fname):
- ''' grab data from pickle file
- '''
- if os.path.isfile(fname):
- FILE=open(fname, 'r')
- out=cPickle.load(FILE)
- FILE.close()
- else:
- raise UtilException("%s : Unable to locate/load file." % (fname,))
- return out
-
def getElfArch(self, debug):
""" determine machine type for ELF file
"""
13 years, 11 months
Branch 'devel' - cas.conf man/en
by Adam Stokes
cas.conf | 2 -
man/en/cas.conf.5 | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 65 insertions(+), 1 deletion(-)
New commits:
commit dc61d346159270913c35c19969d3465735dbff0c
Author: adam stokes <astokes(a)fedoraproject.org>
Date: Mon Apr 26 12:10:17 2010 -0400
add cas.conf manual page
fix typo in cas.conf
diff --git a/cas.conf b/cas.conf
index c30d96c..1ffe014 100644
--- a/cas.conf
+++ b/cas.conf
@@ -41,7 +41,7 @@ workDirectory=/cores
# Mail server, e.g. mail.example.com
# Provides job results via email
-stmphost=mail.example.com
+smtphost=mail.example.com
# database connection info
database=/var/db/cas/cas.db
diff --git a/man/en/cas.conf.5 b/man/en/cas.conf.5
new file mode 100644
index 0000000..10a301e
--- /dev/null
+++ b/man/en/cas.conf.5
@@ -0,0 +1,64 @@
+.TH "cas.conf" "5" "CAS" "cas configuration file"
+.SH NAME
+cas.conf \- Cas configuration file.
+.SH DESCRIPTION
+.sp
+cas.conf is the configuration file for cas.
+.SH [settings] OPTIONS
+.sp
+.in
+.B casuser
+User to run cas as.
+.in
+.B sshkey
+Used when deploying cas over several systems via ssh
+.in
+.B kernels
+Location of debug kernels
+.in
+.B rpmFilter
+Regular expression syntax when searching for kernels
+.in
+.B debugs
+Temporary storage for extracting debug information
+.in
+.B debugLevel
+Debug level for logging (DEBUG, INFO)
+.in
+.B workDirectory
+Work directory
+.in
+.B smtphost
+Mail server for notifications
+.in
+.B database
+Locate for database
+.in
+.B notify
+Receive notifications of core progress and result
+.SH [maintenance] OPTIONS
+.sp
+.in
+.B purgeLimit
+Time frame to keep data (days)
+.in
+.B autoPurge
+Autopurge data when cas-admin is run
+.SH [advanced] OPTIONS
+.sp
+.in
+.B crash_32
+Used when running a x86_64 and wanting to analyze a x86 core
+.in
+.B buffersize
+Buffersize for reading in a core file
+.SH FILES
+.sp
+/etc/cas.conf
+.SH "SEE ALSO"
+.sp
+cas(1)
+.in
+cas-admin(1)
+.in
+Full documentation located in /usr/share/doc/cas-<version>.
13 years, 11 months