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).
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.
Verified 3.2.0.ER5