Bug 790073

Summary: tons of bogus "Version of [Resource X] changed from [null] to []" INFO messages written to Agent log when RHQ Server DB is Oracle
Product: [Other] RHQ Project Reporter: Ian Springer <ian.springer>
Component: Plugin ContainerAssignee: Charles Crouch <ccrouch>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: high Docs Contact:
Priority: high    
Version: 4.2CC: ccrouch, hbrock, hrupp
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 4.3 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-04 07:48:19 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ian Springer 2012-02-13 15:43:28 UTC
Here's an example of the log messages:

2012-02-13 10:17:02,509 INFO  [InventoryManager.discovery-1] (rhq.core.pc.inventory.InventoryManager)- Version of [Resource[id=10059, type=Apache Virtual Host, key=|_default_:443, name=127.0.0.1:443, parent=127.0.0.1:80]] changed from [null] to []
2012-02-13 10:17:02,658 INFO  [InventoryManager.discovery-1] (rhq.core.pc.inventory.InventoryManager)- Version of [Resource[id=10061, type=Apache Virtual Host, key=|_default_:8443, name=127.0.0.1:8443, parent=127.0.0.1:80]] changed from [null] to []
2012-02-13 10:17:03,673 INFO  [InventoryManager.discovery-1] (rhq.core.pc.inventory.InventoryManager)- Version of [Resource[id=10060, type=Apache Virtual Host, key=MainServer, name=Main, parent=127.0.0.1:80]] changed from [null] to []
2012-02-13 10:17:09,305 INFO  [InventoryManager.discovery-1] (rhq.core.pc.inventory.InventoryManager)- Version of [Resource[id=13044, type=JBoss Web, key=SINGLETON, name=JBoss Web, parent=EAP 127.0.0.2 production1]] changed from [null] to []
2012-02-13 10:17:09,376 INFO  [InventoryManager.discovery-1] (rhq.core.pc.inventory.InventoryManager)- Version of [Resource[id=13306, type=Connector, key=http://127.0.0.2:8080, name=http://127.0.0.2:8080, parent=JBoss Web]] changed from [null] to []
2012-02-13 10:17:09,385 INFO  [InventoryManager.discovery-1] (rhq.core.pc.inventory.InventoryManager)- Version of [Resource[id=13305, type=Connector, key=ajp://127.0.0.2:8009, name=ajp://127.0.0.2:8009, parent=JBoss Web]] changed from [null] to []
2012-02-13 10:17:10,388 INFO  [InventoryManager.discovery-1] (rhq.core.pc.inventory.InventoryManager)- Version of [Resource[id=13307, type=Virtual Host, key=localhost, name=localhost, parent=JBoss Web]] changed from [null] to []
2012-02-13 10:17:10,444 INFO  [InventoryManager.discovery-1] (rhq.core.pc.inventory.InventoryManager)- Version of [Resource[id=13045, type=Local Tx Datasource, key=DefaultDS, name=DefaultDS, parent=EAP 127.0.0.2 production1]] changed from [null] to []
2012-02-13 10:17:10,514 INFO  [InventoryManager.discovery-1] (rhq.core.pc.inventory.InventoryManager)- Version of [Resource[id=13046, type=Tx ConnectionFactory, key=JmsXA, name=JmsXA, parent=EAP 127.0.0.2 production1]] changed from [null] to []
2012-02-13 10:17:10,917 INFO  [InventoryManager.discovery-1] (rhq.core.pc.inventory.InventoryManager)- Version of [Resource[id=13050, type=Web Application (WAR), key={default}ROOT.war, name=ROOT.war, parent=EAP 127.0.0.2 production1]] changed from [null] to []
2012-02-13 10:17:10,997 INFO  [InventoryManager.discovery-1] (rhq.core.pc.inventory.InventoryManager)- Version of [Resource[id=13308, type=Web Application Context, key=localhost, name=//localhost/, parent=ROOT.war]] changed from [null] to []

Comment 1 Ian Springer 2012-02-13 15:48:02 UTC
The issue here is that when a newly discovered Resource is reported to the Server, Oracle normalizes a version of "" to NUL (as it does for all columns). This value then gets synced back to the Agent during the next Server->Agent sync. The next time the Agent auto-discovers the same Resource, its version is again "", and the Agent logs a message reporting that the version has changed from null to "", when it actually never truly changed.

Comment 2 Ian Springer 2012-02-13 16:45:08 UTC
Fixed in master - http://git.fedorahosted.org/git/?p=rhq/rhq.git;a=commitdiff;h=7f05ccc. The solution was for the plugin container to immediately normalize values of "" for the Resource version or description to null. Previously, the opposite was actually being done (i.e. null was being normalized to "").

Comment 5 Heiko W. Rupp 2013-09-04 07:48:19 UTC
Bulk closing of some old issues