Comment 2 for bug 1414199

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/149767
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=939f55822615bb352d86d575fbdf50337be6c8a8
Submitter: Jenkins
Branch: master

commit 939f55822615bb352d86d575fbdf50337be6c8a8
Author: Salvatore Orlando <email address hidden>
Date: Fri Jan 23 13:51:15 2015 -0800

    Do not check twice IP allocations for auto-address subnets

    For auto-address subnets such as those with SLAAC and DHCP_STATELESS
    address modes it is ok to delete them even when there are active IP
    allocations.

    The current logic might trigger unexpected 409 errors if IP
    allocations are made on these subnets concurrently with their
    deletion.

    This patch simply ensures the final check for active IP allocations is
    not performed for this class of subnets; since all IP allocations will
    be removed anyway, it does not make sense to check whether there are
    allocations at all. In fact, doing this check might cause a failure
    of the delete operation if an IP allocation is made concurrently.

    This patch also factors out the logic for checking whether there are
    IP allocations on the subnet to avoid code duplication.

    Closes-Bug: #1414199

    Change-Id: I1c4ca6f677845f6e2e8d88f3629c0e91ca73b5d0