Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Skip _remove_deleted_instances_allocations if compute is new
If this is the first start of the compute service and the compute node record does not exist, the resource provider won't exist either. So when the ResourceTracker._remove_deleted_instances_allocations method is called it's going to log an ERROR because get_allocations_for_resource_provider will raise an error since the resource provider doesn't yet exist (that happens later during RT._update() on the new compute node record). We can avoid calling _remove_deleted_instances_allocations if we know the compute node is newly created, so this adds handling for that case. Tests are updated and an unnecessary mock is removed along the way. Change-Id: I37e8ad5b14262d801702411c2c87e73550adda70 Closes-Bug: #1789998
- Loading branch information
Showing
2 changed files
with
63 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters