Bug 841048 - [as7-plugin] Managed servers are not discovered when default host name attribute is used
Summary: [as7-plugin] Managed servers are not discovered when default host name attrib...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Operations Network
Classification: JBoss
Component: Plugin -- JBoss EAP 6
Version: JON 3.1.0
Hardware: All
OS: All
medium
high
Target Milestone: ---
: JON 3.1.1
Assignee: Heiko W. Rupp
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On: 841047
Blocks: as7-plugin
TreeView+ depends on / blocked
 
Reported: 2012-07-18 00:57 UTC by Larry O'Leary
Modified: 2018-11-28 20:13 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 841047
Environment:
Last Closed: 2013-09-11 11:02:45 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1015334 0 unspecified CLOSED EAP 6 host controller domain host update results in managed servers no longer being "manageable" 2021-02-22 00:41:40 UTC
Red Hat Knowledge Base (Solution) 496053 0 None None None Never

Internal Links: 1015334

Description Larry O'Leary 2012-07-18 00:57:31 UTC
+++ This bug was initially created as a clone of upstream RHQ project Bug #841047 +++

Description of problem:
Managed servers do not get discovered when domain or host controller's unique identified/name is determined at runtime instead of being specified in the host.xml configuration file. The only thing logged in the agent is:

DEBUG [InventoryManager.discovery-1] (rhq.core.pc.inventory.InventoryManager)- Executing discovery for [Managed Server] Resources...
DEBUG [ResourceDiscoveryComponent.invoker.daemon-2] (rhq.modules.plugins.jbossas7.ASConnection)- Requested management resource not found: host=master
DEBUG [InventoryManager.discovery-1] (rhq.core.pc.inventory.InventoryManager)- Discovery for [Managed Server] resources completed in [55] ms


In this case, the plug-in is looking for a host named master even though the host configuration name is equal to $(hostname)

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

How reproducible:
Always

Steps to Reproduce:
1.  Install EAP 6 and prepare it for use with JON
2.  Edit domain/configuration/host.xml and remove the naem="master" attribute from the host element
3.  Start EAP using domain.sh
4.  Start JON system
5.  Add EAP 6 server to inventory
  
Actual results:
After discovery has been executed, no managed servers appear in inventory and the following messages appear in the agent log when debug is enabled:

DEBUG [InventoryManager.discovery-1] (rhq.core.pc.inventory.InventoryManager)- Executing discovery for [Managed Server] Resources...
DEBUG [ResourceDiscoveryComponent.invoker.daemon-2] (rhq.modules.plugins.jbossas7.ASConnection)- Requested management resource not found: host=master
DEBUG [InventoryManager.discovery-1] (rhq.core.pc.inventory.InventoryManager)- Discovery for [Managed Server] resources completed in [55] ms


Expected results:
The managed servers `server-one` and `server-two` should appear in inventory and the debug log should reflect that the new managed servers have been discovered and added.

Additional info:
AS7 does not require a name attribute for the host configuration in host.xml.

As of version 1.0[1] of the configuration schema release, this attribute is optional and if not provided will default to the runtime value of InetAddress.getLocalHost().getHostName(). As of schema version 1.3[2], this attribute is still optional but a different default value path is being taken.

[1]: https://github.com/jbossas/jboss-as/blob/master/build/src/main/resources/docs/schema/jboss-as-config_1_0.xsd#L78
[2]: https://github.com/jbossas/jboss-as/blob/master/build/src/main/resources/docs/schema/jboss-as-config_1_3.xsd#L87

Comment 1 Heiko W. Rupp 2012-08-07 16:24:22 UTC
master commit is 2639e5094

Comment 2 Heiko W. Rupp 2012-08-08 15:20:06 UTC
release branch ca526ee7bbe5

Comment 3 John Sanda 2012-08-14 02:16:43 UTC
Moving to ON_QA since JON 3.1.1 ER2 build is availble - https://brewweb.devel.redhat.com/buildinfo?buildID=228250

Comment 4 Sunil Kondkar 2012-08-23 11:00:21 UTC
Verified on JON 3.1.1.ER3 build

Followed the steps (removed the name="master" attribute from the host element in host.xml file ) and verified that the managed servers `server-one` and `server-two` appear in inventory and the agent log displays that the new managed servers have been discovered.

2012-08-23 16:17:40,413 INFO  [ResourceDiscoveryComponent.invoker.daemon-5] (rhq.modules.plugins.jbossas7.ManagedASDiscovery)- Discovered new Managed Server Resource with key [sunillaptop.pnq.redhat.com/server-one].
2012-08-23 16:17:40,455 INFO  [ResourceDiscoveryComponent.invoker.daemon-5] (rhq.modules.plugins.jbossas7.ManagedASDiscovery)- Discovered new Managed Server Resource with key [sunillaptop.pnq.redhat.com/server-three].
2012-08-23 16:17:40,497 INFO  [ResourceDiscoveryComponent.invoker.daemon-5] (rhq.modules.plugins.jbossas7.ManagedASDiscovery)- Discovered new Managed Server Resource with key [sunillaptop.pnq.redhat.com/server-two].


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