Bug 912478 - [as7] Web Runtime resources are not available when running in domain mode
Summary: [as7] Web Runtime resources are not available when running in domain mode
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Operations Network
Classification: JBoss
Component: Plugin -- JBoss EAP 6
Version: JON 3.1.2
Hardware: All
OS: All
unspecified
high
Target Milestone: ER01
: JON 3.2.0
Assignee: Stefan Negrea
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-02-18 18:45 UTC by Larry O'Leary
Modified: 2018-11-30 19:36 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-01-02 20:36:26 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Screen-shot 1 from Standalone (88.91 KB, image/png)
2013-02-18 19:25 UTC, Larry O'Leary
no flags Details
Screen-shot 2 from Domain Server Group (66.67 KB, image/png)
2013-02-18 19:26 UTC, Larry O'Leary
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1034218 0 unspecified CLOSED EAR subdeployments are not discovered for DomainDeployment 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 1091009 0 unspecified CLOSED JON 3.2.0 does not show metrics for Web session and EJB statistics in Domain mode 2021-02-22 00:41:40 UTC
Red Hat Knowledge Base (Solution) 312403 0 None None None Never

Internal Links: 1034218 1091009

Description Larry O'Leary 2013-02-18 18:45:34 UTC
Description of problem:
When running AS7/EAP6 resource is running in domain mode, there is no web runtime resource and therefore no response time metrics are configurable or available. 

Version-Release number of selected component (if applicable):
RHQ_4_4_0_JON312GA

How reproducible:
Always

Steps to Reproduce:
1. Start EAP 6 in domain mode
2. Deploy WAR to EAP 6
3. Force discovery if new WAR is not immediately picked up
  
Actual results:
No Web Runtime resource appears under EAP Domain Controller / Managed Server / EAP server-one / ManagedServerDeployment / jboss-as-helloworld.war and therefore you can not enable response time metric collection or configure the per server log path and name.

Expected results:
Web Runtime resource should appear as a child service of the WAR at EAP Domain Controller / Managed Server / EAP server-one / ManagedServerDeployment / jboss-as-helloworld.war. From its inventory > connection settings page you should be able to enter the response time configuration in the same manner you can in standalone mode.

Additional info:
This appears to be related to the Web Runtime service definition not indicating that it runs inside a ManagedServerDeployment.

This same issue also appears to affect other resources as well:

Comment 1 Larry O'Leary 2013-02-18 19:15:50 UTC
I am still not sure what is going wrong here and what the correct behavior is but my description of the issue may not be completely accurate. I am aware that resources of type Deployment appear under resources of type ServerGroup and therefore I would expect to see the Web Runtime resource appear under my domain by navigating to the parent server group that my deployment has been added to. However, this is not the case. It does not get discovered/added there. 

Furthermore, it would only make sense for the resource type Web Runtime to appear under the server group if the log file name and path could be forced to be relative considering that by using a "group" configuration, the same path and name will get used by all servers that use this server group.

Comment 2 Larry O'Leary 2013-02-18 19:25:12 UTC
Created attachment 699097 [details]
Screen-shot 1 from Standalone

Screen-shot showing what we expect to see.

Comment 3 Larry O'Leary 2013-02-18 19:26:19 UTC
Created attachment 699098 [details]
Screen-shot 2 from Domain Server Group

Screen-shot showing what we see under the domain's server group and that Web Runtime (web) is missing.

Comment 4 Larry O'Leary 2013-02-18 20:14:33 UTC
Looks like child discovery for server group deployments is failing:

2013-02-18 13:28:12,089 DEBUG [InventoryManager.discovery-1] (rhq.core.pc.inventory.RuntimeDiscoveryExecutor)- Running service scan on parent resource [Resource[id=10768, uuid=6045be53-ed12-4144-a69b-c2e2797a7661, type={JBossAS7}Deployment, key=server-group=main-server-group,deployment=jboss-as-helloworld.war, name=jboss-as-helloworld.war, parent=main-server-group]] looking for children of type [{JBossAS7}Web Runtime]
2013-02-18 13:28:12,089 DEBUG [InventoryManager.discovery-1] (rhq.core.pc.inventory.InventoryManager)- Executing discovery for [Web Runtime] Resources...
2013-02-18 13:28:12,131 DEBUG [ResourceDiscoveryComponent.invoker.daemon-5] (rhq.modules.plugins.jbossas7.ASConnection)- Requested management resource not found: server-group=main-server-group,deployment=jboss-as-helloworld.war,subsystem=web
2013-02-18 13:28:12,131 DEBUG [InventoryManager.discovery-1] (rhq.core.pc.inventory.InventoryManager)- Discovery for [Web Runtime] resources completed in [42] ms


This looks like it is due to the Web subsystem not being exposed under server-group but instead under the managed server:

/host=master/server=server-one/deployment=jboss-as-helloworld.war/subsystem=web:read-resource(include-runtime=true)
{
    "outcome" => "success",
    "result" => {
        "active-sessions" => 0,
        "context-root" => "/jboss-as-helloworld",
        "duplicated-session-ids" => 0,
        "expired-sessions" => 0,
        "max-active-sessions" => 0,
        "rejected-sessions" => 0,
        "session-avg-alive-time" => 0,
        "session-max-alive-time" => 0,
        "sessions-created" => 0,
        "virtual-host" => "default-host",
        "servlet" => {"org.jboss.as.quickstarts.helloworld.HelloWorldServlet" => undefined}
    }
}


But we are using the following query:
/server-group=main-server-group/deployment=jboss-as-helloworld.war/subsystem=web:read-resource(include-runtime=true)

Which is invalid.

The same issue may also impact other child resource types such as:
    subsystem=datasources
    subsystem=messaging
    subsystem=ejb3
    subsystem=webservices
    subsystem=jpa

Comment 5 Larry O'Leary 2013-02-19 22:11:23 UTC
By changing the plug-in descriptor for the Web Runtime service resource type to declare that it also runs inside ManagedServerDeployment fixes this issue.

  <service name="Web Runtime"
           class="WebRuntimeComponent"
           discovery="SubsystemDiscovery"
           description="Runtime resources exposed by web components in the deployment."
           singleton="true">

    <runs-inside>
      <parent-resource-type name="Deployment" plugin="&pluginName;"/>
      <parent-resource-type name="Subdeployment" plugin="&pluginName;"/>
      <parent-resource-type name="ManagedServerDeployment" plugin="&pluginName;"/>
    </runs-inside>

    ...


The web runtime subsystem is correctly discovered and becomes available under the managed server's deployment's WAR.

Comment 6 Stefan Negrea 2013-02-20 20:52:14 UTC
Added the web subsystem service to managed server deployments. The RT filter functionality currently implemented by this service will now be available in the managed deployments too.

The current fix will not add the other additional properties available directly from the subsystem mentioned in comment #4. That is tracked as a bug #865629.

master branch commit:
http://git.fedorahosted.org/cgit/rhq/rhq.git/commit/?id=2b908fa04815c7758e0486eb5e5055c6e13f1d15

Comment 7 Larry O'Leary 2013-09-06 14:33:17 UTC
As this is MODIFIED or ON_QA, setting milestone to ER1.


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