A regression was introduced in #226 to where if a child was in the
assigned state (such as a /32 assigned to an interface), it would be
considered as a candidate for get_next_network, while allocated children
where not.
My fix for this builds the list of dirty subnets as the set of Networks
that match the prefix length we're looking for and are in a 'busy' state,
which are the subnets that should be immediately discounted as we look
through all the possible subnets of the desired prefix length.
I've also added a test to the regression tests to check for this. I've
verified that the test fails with the version of models.py that excludes
my fix.
A regression was introduced in #226 to where if a child was in the assigned state (such as a /32 assigned to an interface), it would be considered as a candidate for
get_next_network
, while allocated children where not.My fix for this builds the list of dirty subnets as the set of Networks that match the prefix length we're looking for and are in a 'busy' state, which are the subnets that should be immediately discounted as we look through all the possible subnets of the desired prefix length.
I've also added a test to the regression tests to check for this. I've verified that the test fails with the version of
models.py
that excludes my fix.