<commit_before>---
title: TaskManagerDetailed
category: feature
authors: lpeer, moti, sandrobonazzola
wiki_category: Feature|TaskManager
wiki_title: Features/TaskManagerDetailed
wiki_revision_count: 101
wiki_last_updated: 2015-01-16
---

## Task Manager

### Summary

A Task Manager is a monitor which shows the current actions running in ovirt-engine and tracks their progress. It also capable of presenting completed commands for a period of time. The current design describes tasks monitoring.
[http://ovirt.org/wiki/Features/TaskManager Task Manager feature page](http://ovirt.org/wiki/Features/TaskManager Task Manager feature page)

### Owner

*   Name: [ <NAME>](User:Moti)
    -   Email: <<EMAIL>>
*   Name: [ <NAME>](User:Yair)
    -   Email: <<EMAIL>>
*   GUI Component owner: <NAME> <<EMAIL>>
*   REST Component owner: <NAME> <<EMAIL>>
*   QA Owner: <NAME> <<EMAIL>

### Current status

*   Target Release: 3.1
*   Status: Design Review
*   Last updated date: 21/12/2011

### Detailed Description

A Task Manager is a monitor which shows the current actions running in ovirt-engine server. It provides transparency for the administrator regarding the actions, their progress and status.
The actions will be represented in the Tasks view of the Webadmin, where the status and progress are monitored. The Task Manager will monitor actions' both synchronous and asynchronous tasks.
A simple action describes a command which is consist of 2-3 tasks: verification (CanDoAction), execution and possible finalization (endAction). An complex action might be:

*   A command which has tasks and invokes additional commands internally which are reported as tasks.
*   A chain of commands depended on each other and monitored in respect to the action which triggered the commands sequence.

A task is a meaningful part of the command which the user should be aware of.

The requirements for feature are as follow:
# Providing a mechanism for tasks management/monitoring via UI (i.e - monitor task status, monitor tasks of given action, tasks of a given entity, stop task, stop all tasks of command, restart of failed command).

#\* The first version will include a default implementation for all commands and specific flow monitoring for the specific commands:

#\*\* AddVdsCommand

#\*\* MaintenanceNumberOfVds

#\*\* RunVmCommand

#\*\* StopVmCommand

1.  Defining a global correlation-id which spread cross-systems representing an action (UI--> Backend --> VDSM).
2.  Defining a task dependency/task chaining mechanism (Task B will not start before completion of Task A).
3.  Providing a mechanism to invoke commands asynchronously.
4.  Defining a "best effort task" - The success of the parent command of this task will not be dependent on the result of a task).
5.  Providing permission mechanism for the task management.

The feature will also contain some changes that are required internally for Backend development and to improve task management functionality and correctness of behavior:

1.  Changing serialization of task parameters to JSON - will ease on tasks flow debugging.
2.  Improving task recovery mechanism - in case JBoss restart (there might be a mismatch between last stored task info and the current task status in VDSM).
3.  Abstracting the Tasks representation in Backend (e.g. VDSM, authentication)

### Backend

This section describes the backend design for this feature.

#### Entity Description

The following entities/components will be added:<commit_msg>Detailed Description<commit_after>---
title: TaskManagerDetailed
category: feature
authors: lpeer, moti, sandrobonazzola
wiki_category: Feature|TaskManager
wiki_title: Features/TaskManagerDetailed
wiki_revision_count: 101
wiki_last_updated: 2015-01-16
---

## Task Manager

### Summary

A Task Manager is a monitor which shows the current actions running in ovirt-engine and tracks their progress. It also capable of presenting completed commands for a period of time. The current design describes tasks monitoring.
[http://ovirt.org/wiki/Features/TaskManager Task Manager feature page](http://ovirt.org/wiki/Features/TaskManager Task Manager feature page)

### Owner

*   Name: [ <NAME>](User:Moti)
    -   Email: <<EMAIL>>
*   Name: [ <NAME>](User:Yair)
    -   Email: <<EMAIL>>
*   GUI Component owner: <NAME> <<EMAIL>>
*   REST Component owner: <NAME> <<EMAIL>>
*   QA Owner: <NAME> <<EMAIL>

### Current status

*   Target Release: 3.1
*   Status: Design Review
*   Last updated date: 21/12/2011

### Detailed Description

A Task Manager is a monitor which shows the current actions running in ovirt-engine server. It provides transparency for the administrator regarding the actions, their progress and status.
The actions will be presented in a Tasks view at the Webadmin, where the status and progress are monitored. The Task Manager will monitor actions and their synchronous and asynchronous tasks.
A simple action describes a command which consists of 2-3 tasks: verification (CanDoAction), execution and possible finalization (endAction). An complex action is:

*   A command which has tasks and invokes additional commands internally which are reported as tasks.
*   A chain of commands depended on each other and monitored in respect to the action which triggered the commands sequence.

A command-task is a meaningful part of the command which the user should be aware of.

The requirements for feature are as follow:
# Providing a mechanism for tasks monitoring via UI (i.e - monitor task status, monitor tasks of given action, tasks of a given entity)

1.  Providing a mechanism for tasks management: stop task, stop all tasks of command, restart of failed command, setting priority for a task. (V2)
    -   The first version will include a default implementation for all commands and specific flow monitoring for the specific commands:
        -   AddVdsCommand
        -   MaintenanceNumberOfVds
        -   RunVmCommand
        -   StopVmCommand

2.  Defining a global correlation-id which spread cross-systems representing an action (Client--> Backend --> VDSM).
3.  Defining a task dependency/task chaining mechanism (Task B will not start before completion of Task A).(V2)
4.  Providing a mechanism to invoke commands asynchronously. (V2)
5.  Defining a "best effort task" - The success of the parent command of this task will not be dependent on the result of a task).(V2)
6.  Providing permission mechanism for the task management.(V2)

The feature will also contain some changes that are required internally for Backend development and to improve task management functionality and correctness of behavior:

1.  Changing serialization of task parameters to JSON - will ease on tasks flow debugging.
2.  Improving task recovery mechanism - in case JBoss restart (there might be a mismatch between last stored task info and the current task status in VDSM).

### Backend

This section describes the backend design for this feature.

#### Entity Description

The following entities/components will be added:
{'fraction_non_alphanumeric': 0.06399657924743443, 'fraction_numerical': 0.009549600912200685, 'mean_word_length': 4.311884935654807, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 35, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4321416', 'n_tokens_mistral': 1813, 'n_tokens_neox': 1720, 'n_words': 927}