Created attachment 949888 [details] engine log Description of problem: after adding an external job and some steps and sub steps and ending all of them, failed to clear the job. Version-Release number of selected component (if applicable): rhevm-3.5.0-0.17.beta.el6ev.noarch How reproducible: always. Steps to Reproduce: 1. add an external job Content-Type:application/xml Accept:application/xml https://{engine_server}/api/jobs POST body: <job> <description>job1</description> <auto_cleared>[true|false]</auto_cleared] </job> 2.add two a step (or more) to the job: Content-Type:application/xml Accept:application/xml https://{engine_server}/api/jobs/{job_id}/ POST body: <step> <description>step 1</description> <type>EXECUTING</type> <status> <state>STARTED</state> </status> </step> 3.add sub steps: Content-Type:application/xml Accept:application/xml https://{engine_server}/api/jobs/{job_id}/steps POST body: <step> <parent_step id="<parent step id>" /> <description>sub step 1</description> <type>EXECUTING</type> <status> <state>STARTED</state> </status> </step> 4. end each step: Content-Type:application/xml Accept:application/xml https://{engine_server}/api/jobs/{job_id}/steps/{step_id}/end POST body: <action> <succeeded>true</succeeded> </action> 5. end the job: Content-Type:application/xml Accept:application/xml https://{engine_server}/api/jobs/{job_id}/end POST body: <action> <status> <state>FINISHED</state> </status>> <force>false</force> </action> 6. clear the job: Content-Type:application/xml Accept:application/xml https://{engine_server}/api/jobs/{job_id}/clear POST body: <action> </action> Actual results: Operation failed. from engine log: 2014-10-23 15:58:45,423 INFO [org.ovirt.engine.core.bll.ClearExternalJobCommand] (ajp-/127.0.0.1:8702-8) [4e4adc87] Running command: ClearExternalJobCommand internal: false. Entities affected : ID: aaa00000-0000-0000-0000-123456789aaa Type: SystemAction group INJECT_EXTERNAL_TASKS with role type ADMIN 2014-10-23 15:58:45,428 ERROR [org.ovirt.engine.core.bll.ClearExternalJobCommand] (ajp-/127.0.0.1:8702-8) [4e4adc87] Transaction rolled-back for command: org.ovirt.engine.core.bll.ClearExternalJobCommand. 2014-10-23 15:58:45,428 ERROR [org.ovirt.engine.api.restapi.resource.AbstractBackendResource] (ajp-/127.0.0.1:8702-8) Operation Failed: [] Expected results: operation succeeds jab is clear and doesn't appear any more on through GET in api or on task in the ui. Additional info:
verified with ovirt-engine-3.6.0-0.0.master.20150519172219.git9a2e2b3.el6.noarch according to steps in description.