Bug 618299 - lots of mysterious "Version of [Resource[...]] changed from [null] to []" messages in Agent log
lots of mysterious "Version of [Resource[...]] changed from [null] to []" mes...
Status: CLOSED WONTFIX
Product: RHQ Project
Classification: Other
Component: Plugin Container (Show other bugs)
3.0.0
All All
low Severity medium (vote)
: ---
: ---
Assigned To: RHQ Project Maintainer
Mike Foley
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-07-26 11:19 EDT by Ian Springer
Modified: 2014-06-17 17:22 EDT (History)
3 users (show)

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


Attachments (Terms of Use)

  None (edit)
Description Ian Springer 2010-07-26 11:19:15 EDT
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 11:20:23 EDT
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 08:13:05 EDT
mazz - any thoughts/ideas?
Comment 3 John Mazzitelli 2010-09-28 08:23:26 EDT
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 09:41:02 EDT
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.

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