Bug 509474 - Integrate Audit system from Joshua Roys <joshua.roys@gtri.gatech.edu>
Integrate Audit system from Joshua Roys <joshua.roys@gtri.gatech.edu>
Status: CLOSED CURRENTRELEASE
Product: Spacewalk
Classification: Community
Component: WebUI (Show other bugs)
0.7
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:
Environment:
Last Closed: 2009-09-10 08:06:31 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
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:

https://www.redhat.com/archives/spacewalk-devel/2009-May/msg00121.html

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
java.lang.NullPointerException
	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

path.
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:

b6c10889cc06566260c01aaca469f6fc255be749
66a73d5c6f9332a13e984919ffdcfde596e352b9
31b009b1b2438bdb23afad26d1d133e59457ff40
f52e74c8b13072be93cbf63855041c40c561ba00
df8b91f90d7c141bccbd8eb91939b8e8aea1b8a7
2f1b8106af8da8c404d1f6b977612c0c7e5ea4ca
e5d4ac3729e3adf7e83076630de3cc81c0622783
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.