yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #75333
[Bug 1797580] Re: NoValidHost during live migration after cold migrating to a specified host
Reviewed: https://review.openstack.org/610098
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=ce3af5e33ae6843411e611e81c6ca1c21e0f1e09
Submitter: Zuul
Branch: master
commit ce3af5e33ae6843411e611e81c6ca1c21e0f1e09
Author: Matt Riedemann <mriedem.os@xxxxxxxxx>
Date: Fri Oct 12 12:03:41 2018 -0400
Don't persist RequestSpec.requested_destination
The RequestSpec.requested_destination, similar to the
retry field, is per-request/operation, and persisting
it can caues issues when subsequent move requests.
For example, if you cold migrate a server to a specific
host and then live migrate that server without specifying
a host, the requested target host from the cold migrate
is sent to the scheduler for the live migration, but since
that is where the instance is already running, it's
rejected with NoValidHost.
This is a similar issue to the need to call
RequestSpec.reset_forced_destinations() in all move operations
in conductor. However, rather than try to whack this mole in
every place the request spec is sent to the scheduler, like
reset_forced_destinations() is used, we simply don't need to
persist the requested_destination field since it's just a
vehicle to tell the scheduler which host we want.
The related functional regression test is updated to show
the bug is now fixed.
Change-Id: I2a78f0754c63381c57e7e1c610d0938b6df0f537
Closes-Bug: #1797580
** 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/1797580
Title:
NoValidHost during live migration after cold migrating to a specified
host
Status in OpenStack Compute (nova):
Fix Released
Status in OpenStack Compute (nova) queens series:
In Progress
Status in OpenStack Compute (nova) rocky series:
In Progress
Bug description:
I recreated this with a 2-node devstack in stein created yesterday.
1. create a server
2. cold migrate the server to the other host and specify the host: nova migrate <server> --host <other host>
3. confirm the resize
4. live migrate the server w/o specifying a host so the scheduler has to pick one
At this point, you get a NoValidHost error because the scheduler is
restricted to the current host on which the instance is running
because of the requested_destination field that is persisted in the
request spec from step 2:
http://paste.openstack.org/show/731972/
The problem is when cold migrating a server with a specified target
host, compute API stores that on the request spec and sends it to the
conductor to tell the scheduler which host to use:
https://github.com/openstack/nova/blob/20bc0136d0665bafdcd379f19389a0a5ea7bf310/nova/compute/api.py#L3565
But that request spec requested_destination field gets persisted and
then when you live migrate, it's re-used but since the server is
already on that host, we get NoValidHost since you can't live migrate
to the same host.
This is a regression in Queens:
https://review.openstack.org/#/c/408955/
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1797580/+subscriptions
References