Bug 838665

Summary: Changing selected operation does not clear out parameters sent along with request
Product: [Other] RHQ Project Reporter: Charles Crouch <ccrouch>
Component: Core UIAssignee: Mike Thompson <mithomps>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.4CC: fbrychta, hbrock, hrupp, mithomps
Target Milestone: ---   
Target Release: RHQ 4.5.0   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: 4.5.0 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-04 03:32:22 EDT Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 735475    

Description Charles Crouch 2012-07-09 13:58:44 EDT

Steps to reproduce:
1) Go to the Operations > Schedules subtab for the RHQ Agent resource and hit the New button
2) Choose "Get Plugin Info" from the Operation dropdown
3) Note that the operation takes a single argument: "Plugin Name"
5) Choose "Get Info On All Plugins" from the Operation dropdown
6) Note that this operation does not take any arguments
7) Hit the Schedule button
8) Go find the operation in the Schedule > History subtab
9) Note that operation failed, it should have succeeded.

Failure message:
java.lang.RuntimeException: Failed to invoke operation [retrieveAllPluginInfo]
	at org.rhq.plugins.agent.AgentServerComponent.invokeOperation(AgentServerComponent.java:207)
	at sun.reflect.GeneratedMethodAccessor173.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:616)
	at org.rhq.core.pc.inventory.ResourceContainer$ComponentInvocationThread.call(ResourceContainer.java:634)
	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:679)
Caused by: java.lang.IllegalArgumentException: Operation [retrieveAllPluginInfo] does not support params
	at org.rhq.plugins.agent.AgentServerComponent.invokeOperation(AgentServerComponent.java:203)
	... 9 more
Comment 1 Mike Thompson 2012-08-02 10:27:55 EDT
To summarize, the issue is if you go directly to the "Get Info On All Plugins" and schedule it works. However, if you first go to the "Get Plugin Info" screen first it allows you to enter parameters that are cached and sent to "Get Info On All Plugins" operation that doesn't accept any parameters and causes it to fail.
Comment 2 Mike Thompson 2012-08-02 10:31:40 EDT
master commit: 63b805d29a7b66593203de5a006770adab06e105

This was a state issue with things not getting properly cleared out when going from one operation to another.
Comment 3 Filip Brychta 2013-02-21 09:36:38 EST
Verified on 
Version: 4.6.0-SNAPSHOT
Build Number: 2b908fa
Comment 4 Heiko W. Rupp 2013-09-04 03:32:22 EDT
Done in an old release, closing now.