On 11/13/19 11:53, Matt Riedemann wrote:
On 11/13/2019 1:43 PM, melanie witt wrote:
This is because the "get instance list by host" can miss instances that are mid-migration, because of how/where we update the instance.host field.
Why not just filter out any instances that have a non-None task_state? Or barring that, filter out any instances that have an in-progress migration (there is a method that the ResourceTracker uses to get those kinds of migrations occurring either as incoming to or outgoing from the host).
Yeah, an earlier version of the patch was trying to do that:
https://review.opendev.org/#/c/627765/36/nova/compute/manager.py@8455
but it was not a complete list of all the possible migrating intermediate states. We didn't know about the method the resource tracker is already using for the same purpose, that we could re-use.
After some confusion on my part, we removed the task_state checks and now I see we need to put them back. I'll find the RT method and comment on the review.
Thanks for mentioning that.
-melanie