STR: 1) Inventorize EAP 5.1.1 2) In CLI, find AS 3) Run stop operation - OperationManager.scheduleResourceOperation( as.id, "stop", 0, 1, 0, 2*60*1000, new Configuration(), "JBoss AS stop test" ); The operation does not appear in GUI; And nothing happens (EAP runs on). -------------------------------------------------------------------- rhqadmin.lab.eng.bos.redhat.com:7080$ as Resource: id: 11043 name: stacks2.mw.lab.eng.bos.redhat.com:1099 all version: 5.1.1 currentAvailability: UP resourceType: JBossAS Server rhqadmin.lab.eng.bos.redhat.com:7080$ var sch = OperationManager.scheduleResourceOperation( as.id, "stop", 0, 1, 0, 2*60*1000, new Configuration(), "JBoss AS stop test" ); rhqadmin.lab.eng.bos.redhat.com:7080$ sch ResourceOperationSchedule: resource: Resource[id=11043, type=JBossAS Server, key=/root/eap/server/all, name=stacks2.mw.lab.eng.bos.redhat.com:1099 all, parent=stacks2.mw.lab.eng.bos.redhat.com, version=5.1.1]
Is it "shutdown"? Why didn't it throw an exception then. And, "start" did not either.
Yes, it's "shutdown". Here are the ops defined in the plugin descriptor: <operation name="start" displayName="Start" description="Start this application server. The script used is specified in the Operations group of connection properties. This operation will fail if the server is already started."> <results><c:simple-property name="operationResult" description="Outcome of starting the server."/></results> </operation> <operation name="shutdown" displayName="Shut Down" description="Shut down this application server via script or JMX, depending on the settings in the Operations and Advanced groups of connection properties. This operation will fail if the server is already shut down."> <results><c:simple-property name="operationResult" description="Outcome of shutting down the server."/></results> </operation> <operation name="restart" displayName="Restart" description="Shut down (if started) and then start this application server."> <results><c:simple-property name="operationResult" description="Outcome of restarting the server."/></results> </operation> I agree. it should have thrown an "Unknown operation 'stop'." exception.
scheduleResourceOperation() and scheduleGroupOperation() now validate that the specified operation name and parameters are valid for the specified Resource. If not, they throw an IllegalArgumentException - [master f8c0c68].
Thx, that will help.
Setting priority to low since it turned to be an ID-10-T error (I copied a script from somewhere without checking rhq-plugin.xml). Can be closed, as far as I am concerned.
closing, per bug loggers ID-10-T comment (user error)