Bug 1156055 - [external-task] Couldn't clear external job
Summary: [external-task] Couldn't clear external job
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 3.5.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ovirt-3.6.0-rc
: 3.6.0
Assignee: Eli Mesika
QA Contact: sefi litmanovich
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-10-23 13:39 UTC by sefi litmanovich
Modified: 2016-04-20 01:26 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-04-20 01:26:21 UTC
oVirt Team: Infra
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
engine log (1.38 MB, text/plain)
2014-10-23 13:39 UTC, sefi litmanovich
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 38664 0 master MERGED core: Could not clear external job Never

Description sefi litmanovich 2014-10-23 13:39:36 UTC
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:

Comment 1 sefi litmanovich 2015-06-01 15:04:59 UTC
verified with ovirt-engine-3.6.0-0.0.master.20150519172219.git9a2e2b3.el6.noarch according to steps in description.


Note You need to log in before you can comment on or make changes to this bug.