Bug 618299

Summary: lots of mysterious "Version of [Resource[...]] changed from [null] to []" messages in Agent log
Product: [Other] RHQ Project Reporter: Ian Springer <ian.springer>
Component: Plugin ContainerAssignee: RHQ Project Maintainer <rhq-maint>
Status: CLOSED WONTFIX QA Contact: Mike Foley <mfoley>
Severity: medium Docs Contact:
Priority: low    
Version: 3.0.0CC: ccrouch, jshaughn, mazz
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-17 21:22:06 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 2010-07-26 15:19:15 UTC
For example:

Version of [Resource[id=10895, type=VHost, key=jboss.web:host=localhost,type=Host, name=localhost, parent=Embedded JBossWeb Server]] changed from [null] to []

These are printed by InventoryManager.updateResourceVersion()

I see the following code in DiscoveredResourceDetails.setResourceVersion():

        if (resourceVersion == null) {
            resourceVersion = "";
        }

So we normalize "" to null (though I would think the opposite would make more sense). But the question is how did the Resource version ever get a value of null if we do this normalization in DiscoveredResourceDetails.setResourceVersion()?

Comment 1 Ian Springer 2010-07-26 15:20:23 UTC
Heiko said he's been seeing these messages in his Agent log for a long time, so this is not a new issue.

Comment 2 Corey Welton 2010-09-28 12:13:05 UTC
mazz - any thoughts/ideas?

Comment 3 John Mazzitelli 2010-09-28 12:23:26 UTC
The resource version change detection was added a long time ago. Any time a resource component detects that a resource's version has changed, the agent will report that change up to the server so the server can update the version in the database.

I don't think this is anything to be alarmed about.

How the version originally got set to null, I don't know. We probably don't normalize in one place where it should.

Why we normalize null -> "" I can't remember - but I do know if a resource version is null, I'd rather see an empty string in the GUI, versus the word "null" to indicate an unknown or otherwise unset version string.

Comment 4 Ian Springer 2010-09-29 13:41:02 UTC
CORRECTION to the Description: 

[So we normalize "" to null] should be [So we normalize null to ""]

I think we should change the code to normalize "" or any other all-whitespace string to null.