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