This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 869015 - Provide more detailed logging when agent sends inventory report that contains deleted resource types
Provide more detailed logging when agent sends inventory report that contains...
Status: ON_QA
Product: RHQ Project
Classification: Other
Component: Core Server (Show other bugs)
4.5
Unspecified Unspecified
unspecified Severity unspecified (vote)
: ---
: ---
Assigned To: John Sanda
Mike Foley
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-22 14:55 EDT by John Sanda
Modified: 2012-10-22 18:26 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description John Sanda 2012-10-22 14:55:07 EDT
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 15:09:20 EDT
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 17:15:06 EDT
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.