Check the destination host when migrating (partial)

Registered by Sylvain Bauza on 2015-04-27

Migrations (incl. evacuate, live and cold migrate) allow the possibility to either specify a destination host or not. The former option totally bypasses the scheduler by calling the destination Compute RPC API directly.
Unfortunately, there are some cases when migrating a VM, it breaks the scheduler rules so it makes some further boot requests potentially broken due to some constraints not enforced when migrating (like allocation ratios)
As the current API method called select_destinations() only returns one destination per instance requested, there is no way to know if the destination host was a valid target.

The blueprint will accordingly expose a new Scheduler RPC API method called check_my_destination() which will accept filter_properties and request_spec as regular arguments, plus the name of the compute node and will return True or False.
The API for all migrations will be modified to add an extra request body argument called 'check' (accepting True or False) and the corresponding CLI methods will expose that with --check

Blueprint information

Status:
Complete
Approver:
John Garbutt
Priority:
Medium
Drafter:
Sylvain Bauza
Direction:
Approved
Assignee:
Sylvain Bauza
Definition:
Approved
Series goal:
Accepted for mitaka
Implementation:
Implemented
Milestone target:
milestone icon mitaka-3
Started by
John Garbutt on 2015-10-07
Completed by
John Garbutt on 2016-03-02

Related branches

Sprints

Whiteboard

Depends on: https://review.openstack.org/#q,topic:bp/persist-request-spec,n,z
Gerrit topic: https://review.openstack.org/#q,topic:bp/check-destination-on-migrations,n,z

Prerequisite test cleanup: https://review.openstack.org/#/q/status:open+project:openstack/nova+branch:master+topic:split_219761,n,z

Addressed by: https://review.openstack.org/212510
    WIP

Addressed by: https://review.openstack.org/213056
    Clean up live migration retry loop

Addressed by: https://review.openstack.org/219761
    Unify on _schedule_instances

Addressed by: https://review.openstack.org/248833
    Add requested_destination to RequestSpec

Addressed by: https://review.openstack.org/254887
    Factor _rebuild_pick_host out of rebuild_instance
---------------------------

This is now the key patch:

https://review.openstack.org/#/q/topic:bp/check-destinations-on-migrations

Addressed by: https://review.openstack.org/273104
   Get a ReqSpec in evacuate and pass it to scheduler

Addressed by: https://review.openstack.org/277800
    WIP: Provide ReqSpec to live-migrate conductor task

Addressed by: https://review.openstack.org/281418
    WIP: Unshelve using the RequestSpec object

Addressed by: https://review.openstack.org/284974
    WIP: Cold migrate using the RequestSpec object

Addressed by: https://review.openstack.org/314509
    Verify requested_destination in the scheduler

Addressed by: https://review.openstack.org/302828
    Add a RequestSpec generation migration script

Addressed by: https://review.openstack.org/312009
    Resize API operation passing down original RequestSpec

Addressed by: https://review.openstack.org/312757
    Add requested_destination field to RequestSpec

Addressed by: https://review.openstack.org/315572
    WIP: API changes for verifying the scheduler when migrating

Gerrit topic: https://review.openstack.org/#q,topic:bp/check-destination-on-migrations-newton,n,z

(?)

Work Items

Dependency tree

* Blueprints in grey have been implemented.

This blueprint contains Public information 
Everyone can see this information.