Scheduling for live migration

Registered by Dmitry Russkikh on 2012-12-13

Currently live-migration operation wants us to specify destination host for VM. It would be usefull to have ability to utilize scheduler for choosing destination host.

Blueprint information

Status:
Complete
Approver:
Vish Ishaya
Priority:
Low
Drafter:
None
Direction:
Approved
Assignee:
Hans Lindgren
Definition:
Approved
Series goal:
Accepted for grizzly
Implementation:
Implemented
Milestone target:
milestone icon 2013.1
Started by
Russell Bryant on 2013-02-19
Completed by
Russell Bryant on 2013-02-19

Related branches

Sprints

Whiteboard

if I understood your question correctly, it means we need a load monitoring tool that has been installed and utlity scheduler will report which host could be possibled used for
live migration. is that what you mean?

That's one of the possible cases.
The other one introduces states for compute hosts and when a host brought to "maintenance" - all VMs should be migrated from it in accordance with defined scheduling rules.

In the case of scheduling rules, which part of code is in charge of this? and if all VMs have been offline, does any schedule apply?

As far as I know, nova-scheduler.
With no difference whether VM offline or not, Scheduler will be used just to pick target host according to common rules. The difference with existing functionality is that now for live-migration we have to specify instance to be migrated and target compute host. What proposed is to ask scheduler to provide us with the most suitable target host.

COMMENT:
(sorry, this is the only way I could see to write a comment on a blueprint)
One additional concern that should be taken into consideration when choosing a host to live migrate to is the CPU compatibility. It's pointless to choose the best host from the scheduler if the best host doesn't have a compatible CPU. OpenStack already knows how to check if the CPU is compatible during migration (using libvirt's compareCPU function), so I guess it shouldn't be too hard to do that same check during implicit destination host selection.
-radix

Gerrit topic: https://review.openstack.org/#q,topic:bp/live-migration-scheduling,n,z

Addressed by: https://review.openstack.org/20996
    Live migration with an auto selection of dest.

Addressed by: https://review.openstack.org/22193
    Live migration with an auto selection of dest

Addressed by: https://review.openstack.org/21977
    Add select_hosts to scheduler manager rpc

(?)

Work Items