feature of Cancel

Registered by haruka tanizawa

-- Challenge --
Making 'cancel API' of LiveMigration with using Taskflow.

-- Use cases of 'Cancel' --
1. User requests 'live migration'.
2. Nova in turn executes pre-migration -> migration(migrateToURI) -> post-migration.
  * Sometimes, it might be take a long time to migrateToURI if size of VM is too big.
3. User wants to cancel this migration since it takes too long time.
4. User executes 'cancel' of LiveMigration.(Of course, not yes exist.)
5. As nova accepted 'cancel', nova cancels 'live migration' and do rollback.

-- Implements --
Here, 5 is complicated.
Because cancelling varies by what point 'live migation' is in.

During 'pre-migration', nova can cancel with backing VM's status.
During 'migrateToURI', nova can rollback with 'domJobAbort'.
During 'post-migration', nova can't rollback, so return 'Fail' of cancelling to User.

So, how do we know the point of where 'live migation' is in?
How do we know 'point of no return'?
While 'live-migration', VM status and task status of VM is always 'ACTIVE/migrating',
so user can't know pre-migration or post-migration of 'live-migration'.

-- One of the solution --
I think that taskflow can resolve this complicated problem.
Taskflow has flow and each tasks states.
With taskflow(and persistance), I can know point of where 'live migation' is.

-- Others --
I don't know but maybe he also wants to do like me.
https://blueprints.launchpad.net/nova/+spec/cancel-swap-volume

Blueprint information

Status:
Complete
Approver:
None
Priority:
Undefined
Drafter:
haruka tanizawa
Direction:
Needs approval
Assignee:
None
Definition:
Superseded
Series goal:
None
Implementation:
Unknown
Milestone target:
None
Completed by
Russell Bryant

Related branches

Sprints

Whiteboard

Please file blueprints for each specific API change you would like to propose. It should include some design docs for the API addition, as well. This blueprint is too broad. --russellb

(?)

Work Items