Impossible to migrate affinity instances

Bug #1890065 reported by Sam Morrison
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Opinion
Wishlist
Unassigned

Bug Description

We have a hypervisor that needs to go down for maintenance. There are 2 instances on the host within a server group with affinity.

It seems to be impossible to live migrate them both to a different host.

Looks like there used to be a force argument to live migration but this was removed in microversion 2.68

"Remove support for forced live migration and evacuate server actions."

Doesn't mention why this was removed sadly.

Is there a way to temporarily break the affinity contract for maintenance?

Revision history for this message
Balazs Gibizer (balazs-gibizer) wrote :

With latest microversion you cannot ignore the original scheduler hints so the affinity policy of the server group will be applied during the move operations.

Old microversions are still available.

Also nova does not support removing servers from server groups. One loophole to this is that you can delete the whole server group even if there are members in it. This will allow you to do the migration but it also means you lost the affinity for these servers in the future. E.g. there is no way, via the API, to restore the deleted group or add the running servers to a new group.

tags: added: live-migration scheduler server-group
Revision history for this message
Balazs Gibizer (balazs-gibizer) wrote :

I'm setting this as Invalid as it is not a bug. Maybe a new functionality.

Changed in nova:
status: New → Invalid
Revision history for this message
Sam Morrison (sorrison) wrote :

Yeah ok, not a bug from a developer point of view but a bug from an operator point of view.

I don't think this should be marked as invalid as it is a genuine issue that an operator of nova will encounter from time to time and I think the software should be able to handle it.

The work arounds aren't really workable as I assume the old microversion won't be accepted at some stage in the future (or why remove it in the first place) and deleting the server group of a customer isn't acceptable if the operator can't recreate it so the users desired policy is enforced.

Maybe marking this as invalid could be reconsidered?

Revision history for this message
Balazs Gibizer (balazs-gibizer) wrote :

From development perspective this is a new Feature request. So I can set this bug as Whislist but to make a progress with it this needs to be handle through the blueprint process [1]. I foresee that this needs some REST API changes, something where the admin can indicate which schedule hints should be ignored during live migration, so this feature requires a specification[2].

[1] https://docs.openstack.org/nova/latest/contributor/process.html#how-do-i-get-my-code-merged
[2] https://docs.openstack.org/nova/latest/contributor/blueprints.html

Changed in nova:
status: Invalid → Opinion
importance: Undecided → Wishlist
Revision history for this message
Pierre Riteau (priteau) wrote :

A dirty workaround for this issue: temporarily change the policy from affinity to something else, soft-affinity for example. This is stored in the nova_api database, instance_group_policy table, policy column.

Thanks to John Garbutt for the idea.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.