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:
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.
Created attachment 699097 [details] Screen-shot 1 from Standalone Screen-shot showing what we expect to see.
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.
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
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.
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
As this is MODIFIED or ON_QA, setting milestone to ER1.