Description of problem: The 'status' parameter is mandatory for terminating an external job, however it is not described anywhere. In addition, even if the status is set, the final status set to the job might not match the one provided by the user. i.e. if the user asked to terminate a job as 'aborted', it will be marked as 'failed'. Version-Release number of selected component (if applicable): 4.1.master How reproducible: always Steps to Reproduce: 1. send the following request to terminate a job: <action> <force>true</force> </action> Actual results: The request failed due to incomplete parameter. Expected results: The model should declare on that parameter. Additional info: The 'status' for terminating an external job via the api is mandatory: (taken from BackendJobResource.java) public Response end(Action action) { validateParameters(action, "status"); ... } However, the model (Job.java) doesn't define such parameter for the end-job request: interface End { @In Boolean force(); @In Boolean async(); }
I believe that the right way to solve this issue is to add a new 'succeeded' parameter to the operation that ends the job. That parameter should be optional, and by default it should be `true`. Same for the 'step'. The following patch documents that in the specification of the API: Add 'succeeded' parameter to Job.end https://gerrit.ovirt.org/68600 And the following patch implements it in the server: restapi: Add 'succeeded' parameter to Job.end https://gerrit.ovirt.org/68605
Verified on ovirt-engine-4.1.1-0.0.master