Bug 913764

Summary: [as7] Version identifier of EAP resource changes depending on run state of EAP
Product: [JBoss] JBoss Operations Network Reporter: Larry O'Leary <loleary>
Component: Plugin -- JBoss EAP 6Assignee: Thomas Segismont <tsegismo>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: medium Docs Contact:
Priority: unspecified    
Version: JON 3.1.2CC: jcechace, tsegismo
Target Milestone: ER01   
Target Release: JON 3.2.0   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Larry O'Leary 2013-02-22 00:55:33 UTC
Description of problem:
The version reported for an AS 7 resource is inconsistent and changes depending on the state of the resource and availability. This results in confusion to which EAP resource is which and may also pose problems in upgrades and monitoring by resource version.

Version-Release number of selected component (if applicable):
4.4.0.JON312GA

How reproducible:
Always

Steps to Reproduce:
1.  Install JBoss EAP 6.
2.  Rename <JBOSS_HOME> so that the version ends with ".MyDir" such as:

        mv jboss-eap-6.0 jboss-eap-6.0.MyDir

3.  Start EAP 6 domain.
4.  Start ON system.
5.  Enter a valid user and password for the EAP resource.
6.  Execute discovery.
7.  Note that the version reported by the EAP instance is the actual version such as 6.0.0.GA.

    Agent log will confirm:
    
        INFO  [InventoryManager.discovery-1] (rhq.core.pc.inventory.InventoryManager)- Version of [Resource[id=10685, uuid=bbbccfe6-db1a-4a60-b617-08efc3995dd4, type={JBossAS7}JBossAS7 Host Controller, key=/home/loleary/workspace/Cases/00787772/test-env/jboss-eap-6.0.0.MyDir/domain, name=EAP Domain Controller (127.0.0.1:9990), parent=localhost.localdomain, version=EAP 6.0.0.GA]] changed from [EAP 6.0.0.MyDir] to [EAP 6.0.0.GA]

8.  Enter an invalid user and password for the EAP resource.
9.  Due to bug 913737, restart the agent for the connection settings to take affect.
    
    A discovery scan is also required but that will occur on agent restart so no need to manually execute it.
  
Actual results:
Version of EAP resource changed from the valid version identifier to a default version built by discovery. The agent log also will contain the message:
    INFO  [InventoryManager.discovery-1] (rhq.core.pc.inventory.InventoryManager)- Version of [Resource[id=10685, uuid=bbbccfe6-db1a-4a60-b617-08efc3995dd4, type={JBossAS7}JBossAS7 Host Controller, key=/home/loleary/workspace/Cases/00787772/test-env/jboss-eap-6.0.0.MyDir/domain, name=EAP Domain Controller (127.0.0.1:9990), parent=localhost.localdomain, version=EAP 6.0.0.MyDir]] changed from [EAP 6.0.0.GA] to [EAP 6.0.0.MyDir]


Expected results:
A default version should be used until a successful connection to the AS resource is made and the correct version information is read. Once that occurs, the version stored in the resource should only change when EAP says it did (post upgrade/patch/etc).

Comment 3 Thomas Segismont 2013-08-05 13:12:18 UTC
Fixed in master

commit 917414abdf9bbe8e34844a3c92e491cd6f1711a4
Author: Thomas Segismont <tsegismo>
Date:   Fri Jul 26 19:29:31 2013 +0200

The version was determined with a call to the http management interface. Now it's all based on file inspection.

Comment 4 Jakub Cechacek 2013-11-19 12:17:47 UTC
Verified 3.2.0.ER5