Bug 872719 - PRD33 - [RFE] Add support for adding and managing external tasks
Summary: PRD33 - [RFE] Add support for adding and managing external tasks
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: unspecified
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: 3.3.0
Assignee: Eli Mesika
QA Contact: Artyom
Whiteboard: infra
Depends On:
Blocks: 1019470
TreeView+ depends on / blocked
Reported: 2012-11-02 19:54 UTC by Chris Morrissey
Modified: 2016-02-10 19:23 UTC (History)
16 users (show)

Fixed In Version: is6
Doc Type: Enhancement
Doc Text:
External systems and plug-ins can now log their events in the application Audit Log. This feature allows administrators to view events linked to external tasks using the same mechanism as application events.
Clone Of:
Last Closed: 2014-01-21 17:30:41 UTC
oVirt Team: Infra
Target Upstream Version:

Attachments (Terms of Use)
Rest_Screenshot (211.31 KB, image/png)
2013-07-25 09:11 UTC, Artyom
no flags Details

System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2014:0038 0 normal SHIPPED_LIVE Important: Red Hat Enterprise Virtualization Manager 3.3.0 update 2014-01-21 22:03:06 UTC
oVirt gerrit 15219 0 None None None Never

Description Chris Morrissey 2012-11-02 19:54:21 UTC
Description of problem:
We have an external server that plugs into the WebAdmin UI and needs to add long running tasks that the user starts through our plugin to the UI that are running on our server. Our server needs to be able to create the task through the REST API, update it and eventually mark it completed.

Version-Release number of selected component (if applicable):
We would need this for version 4.3.

How reproducible:

Steps to Reproduce:
Actual results:

Expected results:

Additional info:

Comment 1 Chris Morrissey 2012-11-02 21:02:16 UTC
Moving to RHEV-M.

Comment 2 Barak 2013-01-23 11:00:38 UTC
detailed requirements are required

Comment 3 Simon Grinberg 2013-01-23 11:10:36 UTC
Chris could you please elaborate a more? 
1. Inject a task into where - I'm assuming engine task manager?
2. What entity will perform this task -I'm assuming your server?
3. Who will consume this injected information? - I'm assuming your plugin?

I think that the best way to explain the request is to provide a step by step example flow that elaborates what each of the entities (Plugin, engine, your server) is doing on each of these step. This will allow engineering to come with a proper API for it.

Comment 4 Chris Morrissey 2013-01-24 20:01:47 UTC
1. I'm actually not sure in that I don't know the internals of how tasks are handled in oVirt. My understanding at this point is mainly from the UI. The tasks that show up in the bottom panel in the webadmin screen. We'd like our external task to show up there and if injecting it into the engine task manager does that, then I guess that's what is needed.
2. Yes, our server would create the task using a REST API call.
3. We will not be consuming the task information. It is there purely to inform the webadmin or other users about the progress of the tasks running in our server.

Here's an example to demonstrate what we are looking for.

A user would like to clone a VM and cranks up our Rapid Cloning wizard. They fill in all the information and have selected a VM that is currently running. Upon clicking Ok, the information is sent to our server which starts performing a set of actions including the following (Will likely differ in real life, just an example):
   a. Shutdown the VM (oVirt REST)
   b. Coalesce the disk (oVirt REST)
   c. Clone the disk (NetApp controller)
   d. Update metadata in domain associated with new disk (NetApp controller)
   e. Create new VM based on data from original VM (oVirt REST)
   f. Attach cloned disk to VM (oVirt REST)

Each of these items would be a subtask of the overall Cloning task. At the beginning of this process, we would create the Cloning task through REST in oVirt. We could potentially include all the subtasks in the initial creation or add them as needed. Not sure which is best.

As the tasks are performed, we would make REST calls to update the started/ finished status as well as the percentage complete if that's supported.

Note that some of these tasks, such as shutting down a VM, would also show up as a separate task. It would be nice to have a way to pass a task ID when performing the oVirt associated REST calls and have any task it creates show up under our high level task.

Comment 6 Artyom 2013-07-25 09:11:05 UTC
Created attachment 778144 [details]

Comment 7 Artyom 2013-07-25 09:11:57 UTC
Eli I see that in GUI all task are ordered by start time, but in REST it not, really I don't see any order in REST, it's bug?
See screenshot of REST for example.

Comment 8 Eli Mesika 2013-07-25 09:29:30 UTC
(In reply to Artyom from comment #7)
> Eli I see that in GUI all task are ordered by start time, but in REST it
> not, really I don't see any order in REST, it's bug?
> See screenshot of REST for example.

Its a bug , please open a separate BZ for it 
Also , before opening other bugs please check this list of opened BZs from last oVirt test day

988082 	oVirt 	ovirt-engine-core 	emesika@redhat.com 	NEW 		[ExternalTasks] Cannot add sub-step under existing (parent) step 	14:25:57
988086 	oVirt 	ovirt-engine-core 	emesika@redhat.com 	NEW 		[ExternalTasks] When adding new step, type is always EXECUTING 	14:26:10
988087 	oVirt 	ovirt-engine-core 	emesika@redhat.com 	NEW 		[ExternalTasks] When adding new step, state is always STARTED 	14:26:19
988088 	oVirt 	ovirt-engine-core 	emesika@redhat.com 	NEW 		[ExternalTasks] Step cannot be ended as not successful 	14:26:32
988094 	oVirt 	ovirt-engine-core 	emesika@redhat.com 	NEW 		[ExternalTasks] Cannot end existing job

Comment 10 Artyom 2013-09-10 08:52:04 UTC
Verified on is13

Comment 11 Charlie 2013-11-28 00:10:15 UTC
This bug is currently attached to errata RHEA-2013:15231. If this change is not to be documented in the text for this errata please either remove it from the errata, set the requires_doc_text flag to minus (-), or leave a "Doc Text" value of "--no tech note required" if you do not have permission to alter the flag.

Otherwise to aid in the development of relevant and accurate release documentation, please fill out the "Doc Text" field above with these four (4) pieces of information:

* Cause: What actions or circumstances cause this bug to present.
* Consequence: What happens when the bug presents.
* Fix: What was done to fix the bug.
* Result: What now happens when the actions or circumstances above occur. (NB: this is not the same as 'the bug doesn't present anymore')

Once filled out, please set the "Doc Type" field to the appropriate value for the type of change made and submit your edits to the bug.

For further details on the Cause, Consequence, Fix, Result format please refer to:


Thanks in advance.

Comment 13 errata-xmlrpc 2014-01-21 17:30:41 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


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