Instance in anti-affinity group migrate from host1 to host2 success, then migrate back failed

Bug #1811670 reported by jiangyuhao
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Incomplete
Undecided
Sahitya P

Bug Description

Description
===========
Create an instance in anti-affinity group, then migrate this instance from one host to another success, but migrate back failed.

Steps to reproduce
==================
1. create anti-affinity group
+--------------------------------------+---------------+----------------------------------+----------------------------------+--------------------+---------+----------+
| Id | Name | Project Id | User Id | Policies | Members | Metadata |
+--------------------------------------+---------------+----------------------------------+----------------------------------+--------------------+---------+----------+
| 2f9cb321-c62a-4d1c-a8b0-b23748801db5 | anti-affinity | 1f150042e3c34005a25332f7bcf575c3 | 280cf20a856a4da699a56f91777568bc | [u'anti-affinity'] | [] | {} |
+--------------------------------------+---------------+----------------------------------+----------------------------------+--------------------+---------+----------+

2. create an instance in this group
nova boot --flavor 1 --image 480fc701-06b2-451e-baf2-2dec4a0799e6 --nic net-id=4ff1fbc3-b69d-44c6-bedd-16c3c55eadc2 --hint group=2f9cb321-c62a-4d1c-a8b0-b23748801db5 test-anti

3. migrate this instance success
nova migrate 974b3da6-25ca-4169-b708-329c9ab0457e

4. migrate again failed
nova migrate 974b3da6-25ca-4169-b708-329c9ab0457e
ERROR (BadRequest): No valid host was found. No valid host found for cold migrate (HTTP 400) (Request-ID: req-3fc9fa7a-cdcf-4a25-b249-6f8388f20bbc)

5. only have two compute_nodes.
nova hypervisor-list
+--------------------------------------+---------------------+-------+---------+
| ID | Hypervisor hostname | State | Status |
+--------------------------------------+---------------------+-------+---------+
| 4134c729-e9e5-441c-a72d-42efa8a39001 | host-10-43-203-85 | up | enabled |
| cade3580-8221-4cd1-bcb3-23c62142c469 | host-10-43-202-88 | up | enabled |
+--------------------------------------+---------------------+-------+---------+

Expected result
===============
migrate success because this anti-affinity group without other instance.

Actual result
=============
migrate failed in second times.

Environment
===========
1. Exact version of OpenStack you are running. See the following
  Pike

2. Which hypervisor did you use?
   Libvirt + KVM

3. Which networking type did you use?
   Neutron with OpenVSwitch

Logs & Configs
==============
1. nova-scheduler
2019-01-14 19:23:23.555 18615 INFO nova.filters [req-3fc9fa7a-cdcf-4a25-b249-6f8388f20bbc 280cf20a856a4da699a56f91777568bc 1f150042e3c34005a25332f7bcf575c3 - default default] Filtering removed all hosts for the request with instance ID '974b3da6-25ca-4169-b708-329c9ab0457e'. Filter results: ['RetryFilter: (start: 1, end: 1)', 'AvailabilityZoneFilter: (start: 1, end: 1)', 'ComputeFilter: (start: 1, end: 1)', 'ComputeCapabilitiesFilter: (start: 1, end: 1)', 'ImagePropertiesFilter: (start: 1, end: 1)', 'PciPassthroughFilter: (start: 1, end: 1)', 'AggregateCoreFilter: (start: 1, end: 1)', 'AggregateRamFilter: (start: 1, end: 1)', 'AggregateMultiTenancyIsolation: (start: 1, end: 1)', 'NetworkFilter: (start: 1, end: 1)', 'HostOccupiedFilter: (start: 1, end: 1)', 'RamFilter: (start: 1, end: 1)', 'CoreFilter: (start: 1, end: 1)', 'ServerGroupAntiAffinityFilter: (start: 1, end: 0)']

2. request_spec's value changed when first migrate success
update source compute_node in request-spec's server_group_hosts when first migrate success.

Tags: scheduler
tags: added: scheduler
Sahitya P (sahityap)
Changed in nova:
assignee: nobody → Sahitya P (sahityap)
Sahitya P (sahityap)
Changed in nova:
assignee: Sahitya P (sahityap) → nobody
assignee: nobody → Sahitya P (sahityap)
Revision history for this message
Brin Zhang (zhangbailin) wrote :

This is live migrate? or cold migrate?

Revision history for this message
Artom Lifshitz (notartom) wrote :

Looks like this could be a duplicate of bug 1669054. The fix for pike was merged in April 2019, *after* this bug was filed in January 2019. Could you update to latest pike and let us know if that fixes the issue?

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

Marking the bug incomplete as there are question for the reporter. Please set it back to New when such question is answered.

Changed in nova:
status: New → Incomplete
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.