summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.opendev.org>2021-05-20 12:23:51 +0000
committerGerrit Code Review <review@openstack.org>2021-05-20 12:23:51 +0000
commit2f1fa4d82778e9447cf079ea97b5c6eeca2c1329 (patch)
tree7f2b52b7e6a12d44477785cae7cfbf1e0f3574e0
parent0e0c6ad29f6f5414f17521cdf81aa051c1211ddf (diff)
parentfb72d7dca65eefe06bec6880d12271c66b161efb (diff)
downloadironic-2f1fa4d82778e9447cf079ea97b5c6eeca2c1329.tar.gz
Merge "Trivial: comment why we don't check retired in allocations"
-rw-r--r--ironic/conductor/allocations.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/ironic/conductor/allocations.py b/ironic/conductor/allocations.py
index 6cbe72be3..b6ce3ed1c 100644
--- a/ironic/conductor/allocations.py
+++ b/ironic/conductor/allocations.py
@@ -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,