Check the destination host when migrating (Newton)

Registered by Sylvain Bauza

== This is a follow-up blueprint of the Mitaka one ==

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

John Garbutt
Sylvain Bauza
Sylvain Bauza
Series goal:
Accepted for newton
Milestone target:
milestone icon newton-2
Started by
John Garbutt
Completed by
Matt Riedemann

Related branches



Gerrit topic:,topic:bp/check-destination-on-migrations-newton,n,z

Addressed by:
    Re-Proposes to check destination on migrations

Gerrit topic:,topic:bp/check-destination-on-migrations,n,z

Addressed by:
    WIP: Cold migrate using the RequestSpec object

Addressed by:
    Add a RequestSpec generation migration script

Addressed by:
    Resize API operation passing down original RequestSpec

Addressed by:
    Add requested_destination field to RequestSpec

Addressed by:
    WIP: API change for verifying the scheduler when evacuating

Addressed by:
    WIP: API change for verifying the scheduler when live migrating

Addressed by:
    Verify requested_destination in the scheduler

The nova changes are done so marking this complete. We can't easily test this in the gate since we can't test evacuate today, and with a 2-node job testing force host in live migration doesn't test much, since there is only one other host to force the migration to. The remaining changes for this blueprint are to add the microversion support to python-novaclient. -- mriedem 20160607


Work Items

Dependency tree

* Blueprints in grey have been implemented.

This blueprint contains Public information 
Everyone can see this information.