Resize/Cold-migrate doesn't clear request_spec requested_destination and ignore_hosts

Bug #1841904 reported by Fan Zhang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
In Progress
Undecided
Fan Zhang

Bug Description

When confirming or reverting a VERIFY_RESIZE instance, nova does't clear
requested_destinatoin and ignore_hosts of instance's RequestSpec. It will
cause the failure of rebuilding instance, because requested_destination
and ignore_hosts affect the scheduling in rebuilding process.

We have two compute nodes, let's call them hostA and hostB, and we have an
instance built on hostA, then:

1. migrate instance from hostA to hostB, and wait for instance status changing to VERIFY_RESIZE. Now instance RequestSpec's requested_destination is hostB,
ignore_hosts equals ['hostA'] as default CONF.allow_resize_to_same_host is False.

2. confirming or reverting the resize does nothing about instance RequestSpec.

3. rebuild instance with new image, nova set request_spec.force_hosts and
request_spec.force_nodes with current hostA [1]. Scheduler get hostB as matching one, and striping hostA as ignoring one. Then no force host or force node matched, then we get 0 hosts to filter [2]. Eventually get
NoValidHost exception.

Out release is queens-17.0.3, but I checked code on master, it has the
same issue.

[1].https://github.com/openstack/nova/blob/eb6fcb21917d56e4e287513c1159ad4656382714/nova/compute/api.py#L3362
[2].https://github.com/openstack/nova/blob/eb6fcb21917d56e4e287513c1159ad4656382714/nova/scheduler/host_manager.py#L569-L588

Fan Zhang (fanzhang)
Changed in nova:
assignee: nobody → Fan Zhang (fanzhang)
description: updated
Fan Zhang (fanzhang)
summary: - Resize/Cold-migrate doesn't clean request_spec requested_destination and
+ Resize/Cold-migrate doesn't clear request_spec requested_destination and
ignore_hosts
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.opendev.org/679212

Changed in nova:
status: New → In Progress
Fan Zhang (fanzhang)
description: updated
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (master)

Change abandoned by Fan Zhang (<email address hidden>) on branch: master
Review: https://review.opendev.org/679212
Reason: I found these two patches:

1. https://review.opendev.org/#/c/611945/
2. https://review.opendev.org/#/c/649363/

this should solve our problem.

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.