Bug 988094 - [ExternalTasks] Cannot end existing job
[ExternalTasks] Cannot end existing job
Product: oVirt
Classification: Community
Component: ovirt-engine-core (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Eli Mesika
Depends On:
  Show dependency treegraph
Reported: 2013-07-24 13:42 EDT by vszocs
Modified: 2013-09-23 03:28 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-09-23 03:28:09 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 17495 None None None Never
oVirt gerrit 18391 None None None Never

  None (edit)
Description vszocs 2013-07-24 13:42:00 EDT
Assume JOB_ID is ID of existing job.
Assume USER_ID is ID of existing user.

POST /api/jobs/JOB_ID/end

POST response = fault
        <reason>Operation Failed</reason>
        <detail>[action type non monitored]</detail>

GET /api/jobs/JOB_ID = job is still in STARTED state, POST request doesn't seem to have any effect
<job href="/api/jobs/JOB_ID" id="JOB_ID">
        <link href="/api/jobs/JOB_ID/clear" rel="clear"/>
        <link href="/api/jobs/JOB_ID/end" rel="end"/>
    <description>Test Job</description>
    <owner href="/api/users/USER_ID" id="USER_ID"/>

Please advise what is the proper way to end a job with given state.
Comment 1 Eli Mesika 2013-07-27 16:37:00 EDT
Is this the case were 

1)  All steps under the job were successfully ended manually 
2)  Then the job is attempted to end
Comment 2 vszocs 2013-07-30 10:15:18 EDT
(In reply to Eli Mesika from comment #1)
> Is this the case were 
> 1)  All steps under the job were successfully ended manually 
> 2)  Then the job is attempted to end

Yes, exactly. All steps under the given job were ended using succeeded=true because succeeded=false didn't work when trying to end a step (see https://bugzilla.redhat.com/988088).

So if all steps were ended as successful, the corresponding job will also be ended as successful? In other words, when ending a job, the status is calculated depending on status of all its steps?
Comment 3 Eli Mesika 2013-08-01 05:22:25 EDT
fixed in commit : 0052968
Comment 4 Itamar Heim 2013-08-21 12:41:01 EDT
as RC is built, moving to ON_QA (hopefully did not catch incorrect bugs when doing this)
Comment 5 Itamar Heim 2013-09-23 03:28:09 EDT
closing as this should be in 3.3 (doing so in bulk, so may be incorrect)

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