[Nova] How to (live-) migrate instances in a server-group with affinity to another host?

smooney at redhat.com smooney at redhat.com
Thu Jun 1 20:26:13 UTC 2023


On Thu, 2023-06-01 at 22:03 +0200, Christian Rohmann wrote:
> Hello OpenStack-Discuss,
> 
> I was wondering how I as an admin can (live-)migrate instances for which 
> the user applied a server-group with affinity.
> Looking at the API ([1]), there is no (obvious) way to migrate multiple 
> instances or a server-group "en bloc".

correct there is no way to migrate a singel instnace or the block of instance when usign the affintiy policy
> 
> But migrating a single instance out of a group does result in:
> 
> > [...]
> > 2023-06-01 12:20:00.489 6910 INFO nova.scheduler.host_manager 
> > [req-01d9 83eb5 9c8353142098 - default default] Host filter ignoring 
> > hosts:
> > 2023-06-01 12:20:00.490 6910 INFO nova.filters [req-01d9 83eb5 
> > 9c8353142098 - default default] Filter ServerGroupAffinityFilter 
> > returned 0 hosts
> > 2023-06-01 12:20:00.491 6910 INFO nova.filters [req-01d9 83eb5 
> > 9c8353142098 - default default] Filtering removed all hosts for the 
> > request with instance ID '2476cfdd-9315-4bff-ba3e-d3be5874593f'. 
> > Filter results: ['AvailabilityZoneFilter: (start: 10, end: 10)', 
> > 'ComputeFilter: (start: 10, end: 10)', 'ComputeCapabilitiesFilter: 
> > (start: 10, end: 9)', 'ImagePropertiesFilter: (start: 9, end: 9)', 
> > 'ServerGroupAntiAffinityFilter: (start: 9, end: 9)', 
> > 'ServerGroupAffinityFilter: (start: 9, end: 0)']
> > [...] 
> 
> Am I missing something here? Or am I just holding this wrong?
no it not supported.
its one of the limiations of using server grousp and allowing the affintiy policy.
the only way to migrat ethe instance is to disabel the late affintiy check and then force the migration
using an older microversion to bypass the filter.

> 
> 
> 
> Regards
> 
> Christian
> 
> 
> 
> [1] 
> https://docs.openstack.org/api-ref/compute/?expanded=force-migration-complete-action-force-complete-action-detail#live-migrate-server-os-migratelive-action
> 
> 
> 
> 




More information about the openstack-discuss mailing list