Improve the storage of the ActionPlan

Registered by Jean-Emile DARTOIS on 2016-05-03

Description:
The Watcher Planner schedule the `Actions` into an ordered sequence of technical actions (migrations...) such that all security, dependency, and performance requirements are met.
In other words, the Watcher planner builds an appropriate workflow which defines how to schedule in time those different technical actions and for each action what are the pre-requisite conditions.

Then, the Watcher Applier translates the `Actions` into technical actions on the Openstack modules (Nova, Cinder...)

Problem:
In the current implementation of the Watcher Planner the data structure for storing the sequence of action is a linked list.
The linked list implementation only allowing us to perform the actions in a sequential manner. This is a strong limitation because we could for example execute several concurrent migration of VMs ( Live, cold, ...)
Moreover, the current implementation of the Watcher Applier is using TaskFlow thirdparty which is capable of executing a workflow.

Proposal:
We should store the ActionPlan as a directed graph or Directed Acyclic Graph in the watcher database. Each independent Action (or independent subgraph) in the graph could be run in parallel when its dependencies have been satisfied.
When an error occurs at one of the scheduled action, it's coming out the necessity of retry or use an pre-computed alternative path. Considering the Action Plan belonging to a directed acyclic graph, the watcher planner can provide a sub-graph which is capable to react to the error as gracefully as possible.

Blueprint information

Status:
Complete
Approver:
Antoine Cabot
Priority:
High
Drafter:
Jean-Emile DARTOIS
Direction:
Approved
Assignee:
Alexander Chadin
Definition:
Approved
Series goal:
Accepted for ocata
Implementation:
Implemented
Milestone target:
milestone icon ocata-3
Started by
Antoine Cabot on 2016-12-06
Completed by
Antoine Cabot on 2017-01-25

Related branches

Sprints

Whiteboard

Jinquan, I suggest that you unassigned yourself from this BP if you didn't start working on it. I will have someone in my team who can work on it. Thx

Gerrit topic: https://review.openstack.org/#q,topic:bp/planner-storage-action-plan,n,z

Addressed by: https://review.openstack.org/385871
    Add improvements to the planner and workflow mechanisms

Addressed by: https://review.openstack.org/406991
    [WIP] New default planner

Addressed by: https://review.openstack.org/411361
    'next_uuid' Action field is replaced by 'parents'

Addressed by: https://review.openstack.org/415505
    [PoC] Weight planner w/o any validate_parents()

Gerrit topic: https://review.openstack.org/#q,topic:bp/parallel-applier,n,z

(?)

Work Items

Dependency tree

* Blueprints in grey have been implemented.

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.