_update_usage_from_migrations() can end up processing stale migrations
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Medium
|
Chris Friesen |
Bug Description
I recently found a bug in Mitaka, and it appears to be still present in master.
I was testing a separate patch by doing resizes, and bugs in my code had resulted in a number of incomplete resizes involving compute-1. I then did a resize from compute-0 to compute-0, and saw compute-1's resource usage go up when it ran the resource audit.
This got me curious, so I went digging and discovered a gap in the current resource audit logic. The problem arises if:
1) You have one or more stale migrations which didn't complete
properly that involve the current compute node.
2) The instance from the uncompleted migration is currently doing a
resize/
When this happens, _update_
The fix is to check that the instance migration ID matches the ID of the migration being analyzed. This will work because in the case of the stale migration we will have hit the error case in _pair_instances
Changed in nova: | |
assignee: | nobody → Chris Friesen (cbf123) |
status: | New → In Progress |
Changed in nova: | |
importance: | Undecided → Medium |
Not sure why it didn't link, but https:/ /review. openstack. org/#/c/ 339715/ is the proposed fix.