From fb72d7dca65eefe06bec6880d12271c66b161efb Mon Sep 17 00:00:00 2001 From: Dmitry Tantsur Date: Thu, 20 May 2021 11:02:56 +0200 Subject: Trivial: comment why we don't check retired in allocations Change-Id: I31e128f5273cc50bf7662a62080251d8f226f6c5 --- ironic/conductor/allocations.py | 2 ++ 1 file changed, 2 insertions(+) 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, -- cgit v1.2.1