Public bug reported: 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, NoValidHost expcetion is raised [2]. 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 ** Affects: nova Importance: Undecided Assignee: Fan Zhang (fanzhang) Status: New ** Changed in: nova Assignee: (unassigned) => Fan Zhang (fanzhang) ** Description changed: 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, + 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, - NoValidHost expcetion is raised [2]. + 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, NoValidHost expcetion is raised [2]. + 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 -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to OpenStack Compute (nova). https://bugs.launchpad.net/bugs/1841904 Title: Resize/Cold-migrate doesn't clean request_spec requested_destination and ignore_hosts Status in OpenStack Compute (nova): New 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, NoValidHost expcetion is raised [2]. 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 To manage notifications about this bug go to: https://bugs.launchpad.net/nova/+bug/1841904/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : [email protected] Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp

