Bug 1066480

Summary: Exception when execute "Run Garbage Collector" operation from Alert notification
Product: [Other] RHQ Project Reporter: Yury Sukhov <ysukhov>
Component: Alerts, OperationsAssignee: Nobody <nobody>
Status: NEW --- QA Contact:
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.9CC: gerhard.dreschler, hrupp, ysukhov
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 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
server.log none

Description Yury Sukhov 2014-02-18 13:57:50 UTC
Description of problem:
"Run Garbage Collector" operation fails when performed as alert notification during alert firing.

How reproducible:
It is reproduced always 

Steps to Reproduce:
1. Go to "Administration\Alert Definition Templates\RHQ Agent"\"rhq-agent-env.sh" resource
2. Create alert definition with:
      name: test
      priority: major
      condition: Availability Goes down
      notification: Resource operation\Specific resource
                   'Run Garbage Collection' on the ( localhost > RHQ Agent > JVM > Memory Subsystem ) resource
3. Rename file rhq-agent-env.sh
4. Alert is fired
5. Go to tab Notfications into new alert details view
6. Go to localhost > RHQ Agent > JVM > Memory Subsystem and check operation results

Actual results:
1. OK
2. OK
3. OK
4. OK
5. OK, notification executed and status deffered
6. NOK, operation has status Failed and consists following error.
java.lang.IllegalStateException: Name [operation-definition-name] specified for parameter of operation [gc] on MBean [java.lang:type=Memory] is invalid. The MBean operation does not take a parameter by that name.
	at org.rhq.plugins.jmx.MBeanResourceComponent.invokeOperation(MBeanResourceComponent.java:659)
	at org.rhq.plugins.jmx.MBeanResourceComponent.invokeOperation(MBeanResourceComponent.java:607)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.rhq.core.pc.inventory.ResourceContainer$ComponentInvocation.call(ResourceContainer.java:654)
	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:722) 


Expected results:
1. OK
2. OK
3. OK
4. OK
5. OK, notification executed and status deffered
6. OK, operation status Success and no exceptions in server log

Additional info:
The server.log contains many exceptions. It is occured if 12 alert one by one will be fired every 1 seconds.

Comment 1 Yury Sukhov 2014-02-18 13:59:16 UTC
Created attachment 864573 [details]
server.log