Red Hat Bugzilla – Bug 810911
Operation run through "Execute Prompt Command" incorrectly reported as failure in server UI
Last modified: 2015-02-01 18:27:52 EST
+++ This bug was initially created as a clone of Bug #809615 +++
Created attachment 574939 [details]
agent.log showing result of "plugins update" operations -- see 2012-04-03 11:14:23,535
Description of problem: Running certain agent prompt commands through the "Execute Prompt Command" option in the server UI (e.g. "plugins update") is reported as having failed with the stack-trace below, even though the command appears to have been executed successfully, based on the agent's log file.
java.lang.RuntimeException: Call to [org.rhq.plugins.agent.AgentServerComponent.invokeOperation()] with args [[executePromptCommand, Configuration[id=10241]]] was rudely interrupted.
at $Proxy55.invokeOperation(Unknown Source)
Caused by: java.lang.InterruptedException
... 6 more
Version-Release number of selected component (if applicable):
JON Server 3.0.0.GA and Agent 4.2.0.JON300.GA
How reproducible: Always
Steps to Reproduce:
1. Install server and agent.
2. Import agent into server inventory
3. Click on "Operations" tab for agent.
4. Schedule a new "Execute Prompt Command" operation and set the prompt command to be "plugins update"
5. Notice that the operation is listed as having failed under "History" in the server UI, but the agent's agent.log appears to show it as having succeeded.
Actual results: Successful operation reported as unsuccessful on server.
Expected results: If the operation was executed successfully, the status for the operation should reflect this.
Additional info: I tried setting the "Timeout" value to 30 seconds when scheduling the operation, but the status still shows up as "Failed" immediately after scheduling the operation (operation was scheduled as "Now").
We should see if we can reproduce this
I did get a similar error doing this and the command did seem to succeed.
Although I didn't prove it, I think the reason for the error is that the
plugin update needs to shut down the plugin container.
Note that there is an actual 'update plugins' operation defined for this,
and it seemed to work without issue. Also, I tried other prompt commands
which worked fine. I think it's just this one that is a problem.
So, as a workaround, just use the defined operation. Or, ignore the error.
QE: you could also test that the plugin update operation works as