Comment 42 for bug 1443798

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

Reviewed: https://review.openstack.org/176627
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=0536ec113bc438265ba547bb8a8006aa96e646e3
Submitter: Jenkins
Branch: stable/kilo

commit 0536ec113bc438265ba547bb8a8006aa96e646e3
Author: watanabe.isao <email address hidden>
Date: Wed Apr 15 15:48:08 2015 +0900

    Restrict subnet create/update to avoid DHCP resync

    As we know, IPs in subnet CIDR are used for
    1) Broadcast port
    2) Gateway port
    3) DHCP port if enable_dhcp is True, or update to True
    4) Others go into allocation_pools
    Above 1) to 3) are created by default, which means if CIDR doesn't
    have that much of IPs, subnet create/update will cause a DHCP resync.

    This fix is to add some restricts to the issue:
    A) When subnet create, if enable_dhcp is True, /31 and /32
       cidrs are forbidden for IPv4 subnets while /127 and /128 cidrs are
       forbidden for IPv6 subnets.
    B) When subnet update, if enable_dhcp is changing to True and there are no
       more IPs in allocation_pools, the request should be denied.

    Change-Id: I2e4a4d5841b9ad908f02b7d0795cba07596c023d
    Co-authored-by: Andrew Boik <email address hidden>
    Closes-Bug: #1443798
    (cherry picked from commit 0c1f96ad5a6606c1205bd50ea944c3a383892cde)