Merge "Trivial: comment why we don't check retired in allocations"

This commit is contained in:
Zuul 2021-05-20 12:23:51 +00:00 committed by Gerrit Code Review
commit 2f1fa4d827
1 changed files with 2 additions and 0 deletions

View File

@ -103,6 +103,8 @@ def _traits_match(traits, node):
def _candidate_nodes(context, allocation):
"""Get a list of candidate nodes for the allocation."""
# NOTE(dtantsur): not checking the retired flag because it's impossible
# (by the API contract) to have a retired node in the available state.
filters = {'resource_class': allocation.resource_class,
'provision_state': states.AVAILABLE,
'associated': False,