Bug 536588 (RHQ-922) - DELETED resources continue to be processed as part of the server resource sync info
Summary: DELETED resources continue to be processed as part of the server resource syn...
Keywords:
Status: CLOSED NEXTRELEASE
Alias: RHQ-922
Product: RHQ Project
Classification: Other
Component: Inventory
Version: 1.1
Hardware: All
OS: All
urgent
medium
Target Milestone: ---
: ---
Assignee: Jay Shaughnessy
QA Contact: Corey Welton
URL: http://jira.rhq-project.org/browse/RH...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-10-02 15:23 UTC by Jay Shaughnessy
Modified: 2008-10-07 17:37 UTC (History)
0 users

Fixed In Version: 1.1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description Jay Shaughnessy 2008-10-02 15:23:00 UTC
It seems we keep around DELETED resources in order to display deleted resource history.  These deleted resources continue to show up in the server's resource inventory since ResourceSyncInfo does not filter any resources based on status, it reports the resource hierarchy as is.

This results in repeated logging on the agent and server and unnecessary inventory report updates.  I'm seeing inventory reports every 18 seconds from my single agent, the agent continually processing these unknown resources.



Comment 1 Jay Shaughnessy 2008-10-02 19:16:56 UTC
To be clear, this is the result of a DELETE, not an uninventory.  The fact that the DELETED resources were treated as unknown forced the avail report and a service level scan. But the unknown resources were removed from the PC inventory after the fact, since they were DELETED.  So, they were always unknown to the PC, the scans then repeated ad infinitum.

The DELETED resources are still reported by the server as part of ResourceSyncInfo. This would be a bit difficult to change at the moment since RSI lies directly on top of the resource table. The DELETED resources are really of no use to the agent/PC, and so the solution was to just ignore them completely when processing the sync info.  So, we report a little more info from the server and it is discarded (a count of the ignored, DELETED, resources is logged in debug).

This does not affect the DELETE operation on the GUI.  Deletes are not handled via the sync code, they are handled as separate requests to the PC that can succeed or fail. In fact they can not succeed when the agent or parent resource is unavailable.



Comment 2 Jay Shaughnessy 2008-10-07 15:53:47 UTC
Test Procedure:

1) Start up a server and client

2) monitor the agent log and the server log

3) Delete (not uninventory, the "Delete" button) an inventoried resource, for example, a JMS queue.

4) If you don't see inventory report and discovery running repeatedly, like every 20 seconds, then things are working.  Otherwise you'll see repeating log messages on the server and in the agent log.



Comment 3 Corey Welton 2008-10-07 17:35:44 UTC
QA Verified in CR2.  After deleting a war file:

(Agent)
2008-10-07 13:34:14,418 INFO  [ResourceFactory.executor-1] (rhq.core.pc.inventory.DeleteResourceRunner)- Deleting resource from request: 500550
2008-10-07 13:34:25,549 INFO  [MeasurementManager.sender-1] (rhq.core.pc.measurement.MeasurementCollectorRunner)- Measurement collection for [8] metrics took 2517ms - sending report to Server...

(Server)
2008-10-07 13:34:12,626 INFO  [org.rhq.enterprise.server.discovery.DiscoveryBossBean] Received inventory report from RHQ Agent [Agent[id=501050,name=dhcp231-18.rdu.redhat.com,address=10.11.231.18,port=16163,remote-endpoint=socket://10.11.231.18:16163/?rhq.communications.connector.rhqtype=agent&numAcceptThreads=1&maxPoolSize=303&clientMaxPoolSize=304&socketTimeout=60000&enableTcpNoDelay=true&backlog=200,last-availability-report=1223400793682]]. Number of added roots: 0


No repetitive logging.


Comment 4 Red Hat Bugzilla 2009-11-10 21:19:42 UTC
This bug was previously known as http://jira.rhq-project.org/browse/RHQ-922



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