+++ 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 org.rhq.core.pc.inventory.ResourceContainer$ResourceComponentInvocationHandler.invokeInNewThreadWithLock(ResourceContainer.java:479) at org.rhq.core.pc.inventory.ResourceContainer$ResourceComponentInvocationHandler.invoke(ResourceContainer.java:461) at $Proxy55.invokeOperation(Unknown Source) at org.rhq.core.pc.operation.OperationInvocation.run(OperationInvocation.java:217) 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.InterruptedException at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedNanos(AbstractQueuedSynchronizer.java:1042) at java.util.concurrent.locks.AbstractQueuedSynchronizer.tryAcquireSharedNanos(AbstractQueuedSynchronizer.java:1326) at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:257) at java.util.concurrent.FutureTask.get(FutureTask.java:119) at org.rhq.core.pc.inventory.ResourceContainer$ResourceComponentInvocationHandler.invokeInNewThreadWithLock(ResourceContainer.java:473) ... 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 expected.