cas-admin | 10 ++++++----
cas.conf | 13 ++++++++++++-
cas.spec | 9 ++-------
3 files changed, 20 insertions(+), 12 deletions(-)
New commits:
commit 32114ef36afb58811127cd877c7dfddc4f4dc1e6
Author: Adam Stokes <adam.stokes(a)gmail.com>
Date: Wed May 6 20:30:49 2009 -0400
- glob include of existing snippets provided with build
diff --git a/cas.spec b/cas.spec
index a4adbed..462ae10 100644
--- a/cas.spec
+++ b/cas.spec
@@ -43,14 +43,9 @@ rm -rf ${RPM_BUILD_ROOT}
%{python_sitelib}/*
%{_mandir}/man1/cas.1.gz
%{_mandir}/man1/cas-admin.1.gz
-%dir /var/lib/cas/snippets/
+%dir %{_var}/lib/cas/snippets/
%defattr(755,root,root)
-%config(noreplace) /var/lib/cas/snippets/log
-%config(noreplace) /var/lib/cas/snippets/memory
-%config(noreplace) /var/lib/cas/snippets/sys
-%config(noreplace) /var/lib/cas/snippets/template
-%config(noreplace) /var/lib/cas/snippets/traceback
-%config(noreplace) /var/lib/cas/snippets/modules
+%config(noreplace) %{_var}/lib/cas/snippets/*
%doc AUTHORS LICENSE README PKG-INFO doc/*
%changelog
commit 9785212b3fcb00ae7cb6b00a0a46b66f9e560e81
Author: Adam Stokes <adam.stokes(a)gmail.com>
Date: Wed May 6 20:30:33 2009 -0400
- extend some documentation in configuration file
diff --git a/cas.conf b/cas.conf
index 963f3b7..8df8ac8 100644
--- a/cas.conf
+++ b/cas.conf
@@ -1,3 +1,14 @@
+# cas configuration file
+#
+# Things to remember:
+#
+# Acceptable boolean values
+# to enable: "1", "yes", "true", and "on"
+# to disable: "0", "no", "false", and "off"
+#
+# Required settings to be defined:
+# kernels, rpmFilter, debugs, workDirectory, database
+
[settings]
# Where kernel-debuginfo packages are stored
# NOTE: this _can_ include symlinked directories, just be careful they are
@@ -34,7 +45,7 @@ purgeLimit=90
# Enable if want to automatically check and purge data
# whenever cas-admin is run
-autoPurge=Yes
+autoPurge=no
[advanced]
# if running a x86_64 system and wish to analyze 32bit
commit ce97e84f54faa665a10a8622f934e4b7becbc5f3
Author: Adam Stokes <adam.stokes(a)gmail.com>
Date: Wed May 6 20:30:17 2009 -0400
- read configuration option for autopurge as boolean
diff --git a/cas-admin b/cas-admin
index 6824566..2e575d8 100755
--- a/cas-admin
+++ b/cas-admin
@@ -44,7 +44,7 @@ WORKDIRECTORY = config.get("settings","workDirectory")
# read maintenance options
PURGELIMIT = config.get("maintenance","purgeLimit")
-AUTOPURGE = config.get("maintenance","autoPurge")
+AUTOPURGE = config.getboolean("maintenance","autoPurge")
class CasDatabaseHandler(object):
def __init__(self, logger):
@@ -61,6 +61,8 @@ class CasDatabaseHandler(object):
def run(self):
# Uses emacs regex -- see `man find`
+ # TODO: rework kernel filtering to expand scope
+ # beyond just debuginfo rpms.
cmd = ["find", "-L", KERNELS, "-iregex", RPMFILTER]
pipe = Popen(cmd, stdout=PIPE, stderr=PIPE)
# setup count for kernels found, mainly for console output
@@ -91,6 +93,7 @@ class CasDatabaseHandler(object):
self.db.addTimestamp(id, debugKernel, timestamp)
# Cleanup extracted debugs
rmtree(dst)
+ self.casLog.info("Timestamp database built.")
return
class CasServerHandler(object):
@@ -114,7 +117,6 @@ class CasServerHandler(object):
import func.overlord.client as fc
parent_func = fc.Overlord("*")
minions = parent_func.minions
- # DONE: add only servers that respond, purge the rest
for i in minions:
scheme, netloc, path, query, frag = urlparse.urlsplit(i)
hostname, port = netloc.split(":")
@@ -204,8 +206,8 @@ class CasAdminApplication(object):
os.makedirs(DEBUGS)
# if autopurge is enabled lets clean up some stale data
- if AUTOPURGE == 'yes' or AUTOPURGE == 'y':
- self.casLog.debug('Autopurge enabled, begin cleanup')
+ if AUTOPURGE:
+ self.casLog.debug('Autopurge enabled, purging stale data')
purgeHandler = PurgeHandler(int(PURGELIMIT), self.casLog).run()
if self.purgeData: