Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 948076

Summary: EAP Host controller resource reports: The original product type discovered for this AS7 server was JBoss EAP 6, but the server is now reporting its product type is [JBoss AS 7].
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: high Docs Contact:
Priority: unspecified    
Version: JON 3.1.2CC: lzoubek, 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: 2014-01-02 20:35:03 UTC 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:
Attachments:
Description Flags
Excerpt from agent log showing complete exception and stack none

Description Larry O'Leary 2013-04-03 22:37:39 UTC
Description of problem:
Frequently, when an EAP host controller is restarted the resource page will contain a yellow ! message icon stating:

org.rhq.core.pluginapi.inventory.InvalidPluginConfigurationException: The original product type discovered for this AS7 server was JBoss EAP 6, but the server is now reporting its product type is [JBoss AS 7].
	at org.rhq.modules.plugins.jbossas7.BaseServerComponent.validateServerAttributes(BaseServerComponent.java:182)
	at org.rhq.modules.plugins.jbossas7.BaseServerComponent.getAvailability(BaseServerComponent.java:116)
	at sun.reflect.GeneratedMethodAccessor48.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:616)
	at org.rhq.core.pc.inventory.ResourceContainer$ComponentInvocationThread.call(ResourceContainer.java:634)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
	at java.util.concurrent.FutureTask.run(FutureTask.java:166)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
	at java.lang.Thread.run(Thread.java:636)

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

How reproducible:
Almost always

Steps to Reproduce:
1.  Configure EAP 6.0.1 domain with:
        Host Controller: master (host-master.xml)
        Host Controller: slave (host-slave.xml)
2.  Start EAP domain.
3.  Start JON system.
4.  Import EAP host controller master and slave.
5.  Set user and password for host controller master (domain controller).
6.  Verify that both master and slave show as available.
7.  From outside of JON, shutdown the slave host controller
8.  Wait 2 minutes
9.  From outside of JON, start the slave host controller
  
Actual results:
From the UI, the host controller resource page contains a message icon with a message similar to: AVAILABILITY_CHECK    Apr 3, 2013 5:25:23 PM    The original product type discovered for this AS7 server was JBoss EAP 6, but the server is now reporting its product type is [JBoss AS 7].

Agent debug log will contain a complete exception:

DEBUG [InventoryManager.availability-1] (rhq.core.pc.inventory.ResourceContainer$ResourceComponentInvocationHandler)- Call to [org.rhq.modules.plugins.jbossas7.HostControllerComponent.getAvailability()] with args [] failed.
java.util.concurrent.ExecutionException: org.rhq.core.pluginapi.inventory.InvalidPluginConfigurationException: The original product type discovered for this AS7 server was JBoss EAP 6, but the server is now reporting its product type is [JBoss AS 7].

Expected results:
No UI warning/error.

Additional info:
This appears to be due to the product-name attribute not being available while the server is starting up or shutting down and our default value is AS7. This results in the exception being thrown falsely and making its way back to the UI.

Comment 1 Larry O'Leary 2013-04-03 22:38:41 UTC
Created attachment 731432 [details]
Excerpt from agent log showing complete exception and stack

Comment 2 Thomas Segismont 2013-08-07 12:34:18 UTC
Fixed in master

commit 2957d5edc3d6e2cf35fa7078af88548c8f738203
Author: Thomas Segismont <tsegismo>
Date:   Wed Aug 7 14:29:27 2013 +0200

When validating resource configuration, "product-name" attribute must be read on the "host" node address (root node on standalone servers, host=[hostname] on host controllers)

Comment 3 Libor Zoubek 2013-11-15 14:58:36 UTC
verified on JON 3.2.0.ER5