Bug 509474 - Integrate Audit system from Joshua Roys <joshua.roys@gtri.gatech.edu>
Integrate Audit system from Joshua Roys <joshua.roys@gtri.gatech.edu>
Product: Spacewalk
Classification: Community
Component: WebUI (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: Mike McCune
Red Hat Satellite QA List
Depends On:
Blocks: space06
  Show dependency treegraph
Reported: 2009-07-02 21:38 EDT by Mike McCune
Modified: 2009-09-10 08:06 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-09-10 08:06:31 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
patch to fix NPEs (1.07 KB, patch)
2009-07-29 08:32 EDT, Joshua Roys
no flags Details | Diff

  None (edit)
Description Mike McCune 2009-07-02 21:38:45 EDT
Joshua Roys <joshua.roys@gtri.gatech.edu> submitted patches to Spacewalk here:


with subsequent followups on the mailing list.

This bug is to track comments and validation of the feature for Spacewalk 0.6
Comment 1 Mike McCune 2009-07-28 19:54:23 EDT
Few issues found during testing:

* created: /var/satellite/systemlogs/client1 for my first client to try storing logs

Got this in catalina.out:

2009-07-28 16:52:33,402 [TP-Processor3] ERROR org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/rhn].[action] - Servlet.service() for servlet action threw exception
	at com.redhat.rhn.manager.audit.AuditManager.getMachineReviewSections(AuditManager.java:328)
	at com.redhat.rhn.manager.audit.AuditManager.getLastReview(AuditManager.java:227)
	at com.redhat.rhn.manager.audit.AuditManager.getMachines(AuditManager.java:258)
	at com.redhat.rhn.frontend.action.audit.AuditAction.getResult(AuditAction.java:60)
	at com.redhat.rhn.frontend.action.audit.AuditAction.getResult(AuditAction.java:27)
	at com.redhat.rhn.frontend.taglibs.list.helper.ListHelper.setupDataSet(ListHelper.java:107)
	at com.redhat.rhn.frontend.taglibs.list.helper.ListHelper.execute(ListHelper.java:100)
	at com.redhat.rhn.frontend.action.audit.AuditAction.execute(AuditAction.java:41)
	at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)

* Also getting error:

 ERROR org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/rhn].[action] - Servlet.service() for servlet action threw exception
java.lang.NoClassDefFoundError: org/stringtree/json/JSONWriter
	at com.redhat.rhn.frontend.action.audit.AuditSearchAction.execute(AuditSearchAction.java:153)
	at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
	at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:237)
	at com.redhat.rhn.frontend.struts.RhnRequestProcessor.process(RhnRequestProcessor.java:82)
	at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)

when trying to hit the:  https://spacewalk.example.com/rhn/audit/Machine.do

Comment 2 Joshua Roys 2009-07-29 08:30:34 EDT
The NPE on AuditManager.java:328 was the same issue you noted as yesterday - I should be using if(!file.exists()) instead of if(file == null).

As for the second one - you should have stringtree-json-2.0.9.jar in your classpath somewhere, I think.  I found it in java/lib/ after a call to `ant'.

Also, I forgot to update the instructions at the bottom of my site - the directory hierarchy moved around a bit to make rsyncs easier.  It's now: /var/satellite/systemlogs/$(machine)/audit/audit-$T1-$T2.parsed .  The entire /var/log/ can be rsync'd to /var/satellite/systemlogs/$(machine)/ this way.
Comment 3 Joshua Roys 2009-07-29 08:32:19 EDT
Created attachment 355538 [details]
patch to fix NPEs

Here's a patch for the two places - you can just kill the first one if you want, but maybe we can leave it in just in case someone ends up without that dir somehow.
Comment 4 Mike McCune 2009-08-05 20:10:27 EDT
Code for feature pushed to master:

Comment 5 Miroslav Suchý 2009-09-10 08:06:31 EDT
Spacewalk 0.6 released

Note You need to log in before you can comment on or make changes to this bug.