Bug 509474 - Integrate Audit system from Joshua Roys <joshua.roys.edu>
Summary: Integrate Audit system from Joshua Roys <joshua.roys@gtri.gatech.edu>
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Spacewalk
Classification: Community
Component: WebUI
Version: 0.7
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Mike McCune
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: space06
TreeView+ depends on / blocked
 
Reported: 2009-07-03 01:38 UTC by Mike McCune
Modified: 2009-09-10 12:06 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-09-10 12:06:31 UTC
Embargoed:


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

Description Mike McCune 2009-07-03 01:38:45 UTC
Joshua Roys <joshua.roys.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 23:54:23 UTC
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 12:30:34 UTC
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 12:32:19 UTC
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-06 00:10:27 UTC
Code for feature pushed to master:

b6c10889cc06566260c01aaca469f6fc255be749
66a73d5c6f9332a13e984919ffdcfde596e352b9
31b009b1b2438bdb23afad26d1d133e59457ff40
f52e74c8b13072be93cbf63855041c40c561ba00
df8b91f90d7c141bccbd8eb91939b8e8aea1b8a7
2f1b8106af8da8c404d1f6b977612c0c7e5ea4ca
e5d4ac3729e3adf7e83076630de3cc81c0622783

Comment 5 Miroslav Suchý 2009-09-10 12:06:31 UTC
Spacewalk 0.6 released


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