Bug 700616
Summary: | [RHQ 3.0.1][apache] The plugin doesn't reflect the true runtime configuration of apache server which forces monitoring to not be available in all cases | |||
---|---|---|---|---|
Product: | [Other] RHQ Project | Reporter: | Lukas Krejci <lkrejci> | |
Component: | Plugins | Assignee: | Lukas Krejci <lkrejci> | |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Mike Foley <mfoley> | |
Severity: | high | Docs Contact: | ||
Priority: | urgent | |||
Version: | 3.0.1 | CC: | hrupp, loleary, skondkar | |
Target Milestone: | --- | |||
Target Release: | --- | |||
Hardware: | All | |||
OS: | All | |||
Whiteboard: | ||||
Fixed In Version: | Doc Type: | Bug Fix | ||
Doc Text: | Story Points: | --- | ||
Clone Of: | 694476 | |||
: | 702690 769956 (view as bug list) | Environment: | ||
Last Closed: | 2013-09-02 07:14:10 UTC | Type: | --- | |
Regression: | --- | Mount Type: | --- | |
Documentation: | --- | CRM: | ||
Verified Versions: | Category: | --- | ||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
Cloudforms Team: | --- | Target Upstream Version: | ||
Embargoed: | ||||
Bug Depends On: | 694476, 700461 | |||
Bug Blocks: | 702690, 703637, 753904, 753929 |
Description
Lukas Krejci
2011-04-28 19:56:08 UTC
Fixed by the following commits in release-3.0.1 branch: a48c68385ba2fbd226fa62e52b944c2fbcf43515 069d5fc2d0e10278277223dd2c04639caa25e3a4 116411a3e10a5a2e5840d620a14326f5ca9974ce 3e93c6fb5d7dc6b2ab1522d97b845872afbfe1df bd816f6c926b932a2b02349f46b7a00a79c57766 a2c00c6f1da359c6fbd51e391fb4422ada03ac9d 2632a30b0bc37eaabbac4e82afc8388411cb34dd 7d71991e8df59f75bdfe5c9c2929f8d27956b05c 258be003ddf7bf022611ef183ed60a7e7ee7ef18 Apart from a number of internal changes to support extracting the runtime configuration of the apache instance, there are 4 user-facing changes: 1) Virtual hosts inside IfModule, IfDefine or IfVersion directives (or combination thereof) are discovered as long as they are active in the current runtime configuration of the apache instance 2) The "SNMP WWW Service Index" property in the connection settings of the virtual hosts was re-introduced (it used to exist in read-only form in RHQ 1.x but was removed in RHQ 3.0.(0|1)). It is now writeable by the user so that it is possible to assign correct values to the RHQ3-discovered resources without re-inventorying them. 3) The Apache server resource has a new operation called "Detect SNMP WWW Service Index values for Virtual Hosts". This outputs a mapping from virtual host resource key to a corresponding SNMP WWW Service Index value as discovered by the plugin. This is to aid the users in assigning those values to individual inventoried vhost resources (the plugin is only able to assign the value during the discovery, an already inventoried resource has to be edited manually). 4) Reading or updating the configuration of virtual hosts that contain additional If* directives is not supported (the previous version of the plugin would be oblivious about the configuration contained inside the conditional directives and could therefore break the configuration altogether). The SNMP WWW Service Index value for virtual hosts is dependent on the position of the virtual host in the configuration files. Therefore whenever a new vhost is added to the configuration of the apache instance (either manually or using RHQ), the values for all vhosts should be checked if they are still correct. If the new vhost is added in such a place in the configuration files that it is inserted "in the middle of" the pre-existing vhosts in the runtime configuration, the SNMP WWW Service Index values will have to be manually updated for all vhosts that end up *before* that vhost (this might seem paradoxical, but is a consequence of the fact that apache internally stores the vhosts in the reverse order they are defined in (with exception of the "main server" vhost that is always first)). The runtime configuration of an apache instance is a union of all configuration files filtered by conditional If* directives. The union is produced by replacing each "Include" directive by the contents of the files it specifies (if there is more than 1 file included using a single directive, the files are included in the alphabetical order). Note that the connection property and operation is only present in the RHQ 3 codebase. RHQ4 (bug 694476) doesn't need these because the value of the SNMP WWW Service Index is determined and automatically updated internally at runtime and no user intervention is needed. Patch isn't being picked up by JON 2.4.1 server. It is throwing the following error/exception: 2011-05-06 11:40:04,000 ERROR [org.rhq.enterprise.server.core.plugin.ProductPluginDeployer] Failed to register RHQ plugin file [file:/opt/jboss/jon/jon-server-2.4.1.GA/jbossas/server/default/deploy/rhq.ear/rhq-downloads/rhq-plugins/rhq-apache-plugin-3.0.1.GA.jar] javax.ejb.EJBException: java.lang.NullPointerException at org.jboss.ejb3.tx.Ejb3TxPolicy.handleExceptionInOurTx(Ejb3TxPolicy.java:63) at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:83) at org.jboss.aspects.tx.TxInterceptor$RequiresNew.invoke(TxInterceptor.java:253) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:95) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77) at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:110) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:240) at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:210) at org.jboss.ejb3.stateless.StatelessLocalProxy.invoke(StatelessLocalProxy.java:84) at $Proxy364.registerPluginInNewTransaction(Unknown Source) at org.rhq.enterprise.server.resource.metadata.ResourceMetadataManagerBean.registerPlugin(ResourceMetadataManagerBean.java:299) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112) at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166) at org.rhq.enterprise.server.common.TransactionInterruptInterceptor.addCheckedActionToTransactionManager(TransactionInterruptInterceptor.java:77) at sun.reflect.GeneratedMethodAccessor110.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118) at org.rhq.enterprise.server.authz.RequiredPermissionsInterceptor.checkRequiredPermissions(RequiredPermissionsInterceptor.java:156) at sun.reflect.GeneratedMethodAccessor109.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118) at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79) at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:95) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77) at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:110) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:240) at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:210) at org.jboss.ejb3.stateless.StatelessLocalProxy.invoke(StatelessLocalProxy.java:84) at $Proxy364.registerPlugin(Unknown Source) at org.rhq.enterprise.server.core.plugin.ProductPluginDeployer.registerPluginJar(ProductPluginDeployer.java:504) at org.rhq.enterprise.server.core.plugin.ProductPluginDeployer.access$000(ProductPluginDeployer.java:56) at org.rhq.enterprise.server.core.plugin.ProductPluginDeployer$LatchedPluginDeploymentService.executeService(ProductPluginDeployer.java:613) at org.rhq.enterprise.server.core.concurrency.LatchedServiceController$LatchedService.run(LatchedServiceController.java:266) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) Caused by: java.lang.NullPointerException at org.rhq.enterprise.server.resource.metadata.ResourceMetadataManagerBean.updateResourcePluginConfiguration(ResourceMetadataManagerBean.java:978) at org.rhq.enterprise.server.resource.metadata.ResourceMetadataManagerBean.updatePluginConfiguration(ResourceMetadataManagerBean.java:955) at org.rhq.enterprise.server.resource.metadata.ResourceMetadataManagerBean.mergeExistingType(ResourceMetadataManagerBean.java:675) at org.rhq.enterprise.server.resource.metadata.ResourceMetadataManagerBean.updateType(ResourceMetadataManagerBean.java:657) at org.rhq.enterprise.server.resource.metadata.ResourceMetadataManagerBean.updateTypes(ResourceMetadataManagerBean.java:458) at org.rhq.enterprise.server.resource.metadata.ResourceMetadataManagerBean.updateTypes(ResourceMetadataManagerBean.java:463) at org.rhq.enterprise.server.resource.metadata.ResourceMetadataManagerBean.registerPluginInNewTransaction(ResourceMetadataManagerBean.java:353) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112) at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166) at org.rhq.enterprise.server.common.TransactionInterruptInterceptor.addCheckedActionToTransactionManager(TransactionInterruptInterceptor.java:77) at sun.reflect.GeneratedMethodAccessor110.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118) at org.rhq.enterprise.server.authz.RequiredPermissionsInterceptor.checkRequiredPermissions(RequiredPermissionsInterceptor.java:156) at sun.reflect.GeneratedMethodAccessor109.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118) at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79) ... 68 more commit 5d9ebbfb39f859099048e24e7c23bc4e7cbe4ef1 Author: Lukas Krejci <lkrejci> Date: Mon May 9 20:37:04 2011 +0200 BZ 700616 - using the legacy code to create the virtual host resource keys to ensure the backwards compatibility with previous versions of the plugin. commit 34371638426c8d83444f9aa1e2e5ec622c157543 Author: Lukas Krejci <lkrejci> Date: Mon May 9 12:57:31 2011 +0200 BZ 700616 - adding a default value to the new snmpWwwServiceIndex property so that updating the plugin actually works when there are some inventoried vhosts already on the server. Additional commits that bring release-3.0.1 branch in sync with the code that will go into the master branch: commit 5e55fb232d2496961477debd9d5eaf94837d69d4 Author: Lukas Krejci <lkrejci> Date: Tue May 10 16:58:28 2011 +0200 BZ 700616 - make sure to call getVersion() instead of resourceContext.getVersion() directly. This is just to workaround the possible null version being returned from the resourceContext in rare circumstances. commit dc92e3b118d14e0aadaf2a2143b566f79662d6d9 Author: Lukas Krejci <lkrejci> Date: Tue May 10 16:57:15 2011 +0200 BZ 700616 - ported over the code from master to handle the user provided module name <-> source file mappings for apache modules. Porting the final bugfix from bug 694476 to release-3.0.1 branch: commit 434616bdc1fa49b90a03b54d6f1fed7bf9227c2d Author: Lukas Krejci <lkrejci> Date: Wed May 18 13:55:51 2011 +0200 BZ 694476 - fixing the handling of loaded modules. Verified in build#51(release 301 branch) Verified all the Apache tests as mentioned in the bug#694476). Marking as verified. Bulk closing of issues that were VERIFIED, had no target release and where the status changed more than a year ago. |