Reviewed: https://review.opendev.org/695220 Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=4921e822e73383af0c8da4c5e3acfaa021eafe68 Submitter: Zuul Branch: master
commit 4921e822e73383af0c8da4c5e3acfaa021eafe68 Author: Matt Riedemann <mriedem...@gmail.com> Date: Wed Nov 20 10:27:18 2019 -0500 Use COMPUTE_SAME_HOST_COLD_MIGRATE trait during migrate This uses the COMPUTE_SAME_HOST_COLD_MIGRATE trait in the API during a cold migration to filter out hosts that cannot support same-host cold migration, which is all of them except for the hosts using the vCenter driver. For any nodes that do not report the trait, we won't know if they don't because they don't support it or if they are not new enough to report it, so the API has a service version check and will fallback to old behavior using the config if the node is old. That compat code can be removed in the next release. As a result of this the FakeDriver capabilities are updated so the FakeDriver no longer supports same-host cold migration and a new fake driver is added to support that scenario for any tests that need it. Change-Id: I7a4b951f3ab324c666ab924e6003d24cc8e539f5 Closes-Bug: #1748697 Related-Bug: #1811235 ** Changed in: nova Status: In Progress => Fix Released -- 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/1748697 Title: Cold migration fails when the filter only returns the host where the vm is located and the vm status is set to ERROR Status in OpenStack Compute (nova): Fix Released Bug description: Description =========== The configuration: allow_resize_to_same_host=True. Cold migration fails when the filter only returns the host where the vm is located and the vm status is set to ERROR. Steps to reproduce ================== 1、create a vm 2、disable all hosts except the host which the vm is located 3、cold migrate the vm, you can see the exception.UnableToMigrateToSelf in compute log, and the vm status is set to ERROR while it still running Expected result =============== cold migrate failed, and user should see HTTP400 NovaildHost from console output, because cold migrate to same host is meaningless. The vm status still keep Active. Actual result ============= cold migrate failed, nothing returns from console, and vm status is set to ERROR. Environment =========== nova16.0.4 KVM $ libvirt Logs & Configs ============== allow_resize_to_same_host=True PS: If the host which the vm located is particularly resource-rich, filters return this host each time when user executes cold migration. Even if the resources of other hosts can meet the requirements of the virtual machine, the vm can never be cold-migrated. To manage notifications about this bug go to: https://bugs.launchpad.net/nova/+bug/1748697/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : yahoo-eng-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp