Bug 803820

Summary: [jboss-as-7 plugin] a number of traits on the two Server types return null values
Product: [Other] RHQ Project Reporter: Ian Springer <ian.springer>
Component: PluginsAssignee: Heiko W. Rupp <hrupp>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: high Docs Contact:
Priority: medium    
Version: 4.3CC: ccrouch, hrupp
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
AS 7.1.1.Final, EAP 6.0.0.Beta1
Last Closed: 2013-09-04 07:49:05 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:
Bug Depends On:    
Bug Blocks: 707223    

Description Ian Springer 2012-03-15 17:23:53 UTC
=== Standalone Server ===
testProductNameTrait(org.rhq.modules.plugins.jbossas7.itest.standalone.StandaloneServerComponentTest): Collected null value for trait [product-name] for Resource[id=2, uuid=c0fde167-d2e8-4262-b1a3-5e6d98df5871, type={jboss-as-7}JBossAS7 Standalone Server, key=/tmp/jboss-as-7.1.1.Final, name=/tmp/jboss-as-7.1.1.Final, parent=pc, version=7.1.1.Final]. expected object to not be null
  testProductVersionTrait(org.rhq.modules.plugins.jbossas7.itest.standalone.StandaloneServerComponentTest): Collected null value for trait [product-version] for Resource[id=2, uuid=c0fde167-d2e8-4262-b1a3-5e6d98df5871, type={jboss-as-7}JBossAS7 Standalone Server, key=/tmp/jboss-as-7.1.1.Final, name=/tmp/jboss-as-7.1.1.Final, parent=pc, version=7.1.1.Final]. expected object to not be null
  testServerStateTrait(org.rhq.modules.plugins.jbossas7.itest.standalone.StandaloneServerComponentTest): Collected null value for trait [server-state] for Resource[id=2, uuid=c0fde167-d2e8-4262-b1a3-5e6d98df5871, type={jboss-as-7}JBossAS7 Standalone Server, key=/tmp/jboss-as-7.1.1.Final, name=/tmp/jboss-as-7.1.1.Final, parent=pc, version=7.1.1.Final]. expected object to not be null
  testStartTimeTrait(org.rhq.modules.plugins.jbossas7.itest.standalone.StandaloneServerComponentTest): Collected null value for trait [startTime] for Resource[id=2, uuid=c0fde167-d2e8-4262-b1a3-5e6d98df5871, type={jboss-as-7}JBossAS7 Standalone Server, key=/tmp/jboss-as-7.1.1.Final, name=/tmp/jboss-as-7.1.1.Final, parent=pc, version=7.1.1.Final]. expected object to not be null

(strangely startTime works fine for Domain Servers)

=== Domain Server ===  testProductNameTrait(org.rhq.modules.plugins.jbossas7.itest.domain.DomainServerComponentTest): Collected null value for trait [product-name] for Resource[id=4, uuid=8939f54a-2d67-4a52-b49f-0681a7f03feb, type={jboss-as-7}JBossAS7 Host Controller, key=DomainController, name=DomainController, parent=pc, version=7.1.1.Final]. expected object to not be null
  testProductVersionTrait(org.rhq.modules.plugins.jbossas7.itest.domain.DomainServerComponentTest): Collected null value for trait [product-version] for Resource[id=4, uuid=8939f54a-2d67-4a52-b49f-0681a7f03feb, type={jboss-as-7}JBossAS7 Host Controller, key=DomainController, name=DomainController, parent=pc, version=7.1.1.Final]. expected object to not be null

Comment 1 Ian Springer 2012-03-16 04:51:40 UTC
Looks better on the EAP side - for EAP 6.0.0.Beta1, only two of the traits come back null, both for a Domain Server:

testProductNameTrait(org.rhq.modules.plugins.jbossas7.itest.domain.DomainServerComponentTest): Collected null value for trait [product-name] for Resource[id=2, uuid=b8d4ea9b-3116-4f2b-a583-8eaa3f98e97a, type={jboss-as-7}JBossAS7 Host Controller, key=DomainController, name=DomainController, parent=pc, version=7.1.1.Final]. expected object to not be null
  testProductVersionTrait(org.rhq.modules.plugins.jbossas7.itest.domain.DomainServerComponentTest): Collected null value for trait [product-version] for Resource[id=2, uuid=b8d4ea9b-3116-4f2b-a583-8eaa3f98e97a, type={jboss-as-7}JBossAS7 Host Controller, key=DomainController, name=DomainController, parent=pc, version=7.1.1.Final]. expected object to not be null

Comment 2 Mike Foley 2012-03-19 16:19:03 UTC
per BZ triage (asantos, ccrouch, loleary, mfoley)

Comment 3 Heiko W. Rupp 2012-03-23 11:12:35 UTC
Special trait handling code has been added in 
master 270fcf9eaf6dd1989399d0eb1ba54b882fc3ffcc

Comment 4 Ian Springer 2012-03-23 21:18:54 UTC
The domain traits are working great now, but the standalone traits are still returning null values:

Failed tests:   testMetricsHaveNonNullValues(org.rhq.modules.plugins.jbossas7.itest.standalone.StandaloneServerComponentTest): Null values were collected for the following metrics: [server-state, _skm:release-codename, _skm:release-version, _skm:product-name, _skm:product-version, startTime] expected:<0> but was:<6>
  testReleaseVersionTrait(org.rhq.modules.plugins.jbossas7.itest.standalone.StandaloneServerComponentTest): Unexpected value for trait [_skm:release-version]. expected:<7.1.0.Final-redhat-1> but was:<null>


I get the same failures running against EAP 6.0.0.Beta1 and AS 7.1.2.Final-SNAPSHOT (i.e. latest successful build from Jenkins).

Comment 5 Ian Springer 2012-03-26 17:04:53 UTC
The null values were actually because of another bug - the wrong port was being discovered for the standalone server, because the discovery code did not take into account a port offset specified on the command line via the "jboss.socket.binding.port-offset" sysprop. The following commit fixes that issue:

http://git.fedorahosted.org/git/?p=rhq/rhq.git;a=commitdiff;h=ef0c9d9

And the itests now get non-null values for all the traits.

Comment 7 Heiko W. Rupp 2013-09-04 07:49:05 UTC
Bulk closing of some old issues