Bug 618299 - lots of mysterious "Version of [Resource[...]] changed from [null] to []" messages in Agent log
Summary: lots of mysterious "Version of [Resource[...]] changed from [null] to []" mes...
Alias: None
Product: RHQ Project
Classification: Other
Component: Plugin Container
Version: 3.0.0
Hardware: All
OS: All
medium vote
Target Milestone: ---
: ---
Assignee: RHQ Project Maintainer
QA Contact: Mike Foley
Depends On:
TreeView+ depends on / blocked
Reported: 2010-07-26 15:19 UTC by Ian Springer
Modified: 2014-06-17 21:22 UTC (History)
3 users (show)

Clone Of:
Last Closed: 2014-06-17 21:22:06 UTC

Attachments (Terms of Use)

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.

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