Bug 869015 - Provide more detailed logging when agent sends inventory report that contains deleted resource types
Summary: Provide more detailed logging when agent sends inventory report that contains...
Keywords:
Status: ON_QA
Alias: None
Product: RHQ Project
Classification: Other
Component: Core Server
Version: 4.5
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Nobody
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-10-22 18:55 UTC by John Sanda
Modified: 2022-03-31 04:27 UTC (History)
1 user (show)

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


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 812925 0 high ON_QA Server should filter out deleted resources when sending resource tree to agent during inventory sync 2022-03-31 04:27:39 UTC
Red Hat Bugzilla 869063 0 high CLOSED Stale resource types due to failed plug-in purge 2021-02-22 00:41:40 UTC

Internal Links: 812925 869063

Description John Sanda 2012-10-22 18:55:07 UTC
Description of problem:
An agent can send the server an inventory report that contains one or more resource types that have been deleted on the server. This can happen after plugin deletion occurs on the server. The server throws an exception to let the agent know it needs to update its list of plugins. The exception results in a log message that says, "The report contains one or more resource types that have been marked for deletion." It would be helpful if we logged a message that lists what those resource types are.


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 John Sanda 2012-10-22 19:09:20 UTC
Currently, we only log an ERROR message along with the stack trace in DiscoveryServerServiceImpl. This really should be logged at INFO because it is a normal, expected work flow.

Comment 2 John Sanda 2012-10-22 21:15:06 UTC
I have made a couple changes around the logging. DiscoveryBossBean will log a message like the following when it receives a report with one or more deleted types and when DEBUG logging is turned on,

DEBUG [org.rhq.enterprise.server.discovery.DiscoveryBossBean] The inventory report from Agent[id=0,name=192.168.1.19,address=null,port=0,remote-endpoint=null,last-availability-ping=null,last-availability-report=null] with added roots [Resource[id=0, uuid=da82a131-7491-4337-9e17-c4c006cf2b67, type={JBossAS7}JBossAS7 Standalone Server, key=/usr/local/var/jboss-as-7.1.1.Final/standalone, name=AS (127.0.0.1:9990), parent=192.168.1.19, version=7.1.1.Final]] contains these deleted resource types [ResourceType[id=0, name=JBossAS7 Standalone Server, plugin=JBossAS7, category=Server]]

And it will log this if INFO is turned on,

DEBUG [org.rhq.enterprise.server.discovery.DiscoveryBossBean] The inventory report from Agent[id=0,name=192.168.1.19,address=null,port=0,remote-endpoint=null,last-availability-ping=null,last-availability-report=null] contains these deleted resource types [ResourceType[id=0, name=JBossAS7 Standalone Server, plugin=JBossAS7, category=Server]]

DiscoveryServerServiceImpl has been refactored so that it no longer logs anything for the StaleTypeException. It just propagates the exception back to the agent.

Changes have been pushed to master.

master commit hash: c5c722c853ca0


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