subnetpool allocation not working with multiples subnets on a unique network

Bug #1451559 reported by Cedric Brandily
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Medium
Ryan Tidwell
Kilo
New
Undecided
Unassigned

Bug Description

The following scenario is not working:

#$ neutron subnetpool-create pool --pool-prefix 10.0.0.0/8 --default-prefixlen 24
#$ neutron net-create net
#$ neutron subnet-create net --name subnet0 10.0.0.0/24
#$ neutron subnet-create net --name subnet1--subnetpool pool
>>> returns a 409

Last command fails because neutron tries to allocate to subnet1 the 1st unallocated cidr from 10.0.0.0/8 pool => 10.0.0.0/24 but subnet net as already 10.0.0.0/24 as cidr (subnet0) and overlapping cidrs are disallowed on the same network!

Changed in neutron:
assignee: nobody → Cedric Brandily (cbrandily)
Revision history for this message
Carl Baldwin (carl-baldwin) wrote :

You should think of the first subnet create as creating a subnet from a special pool. We've called that pool the "implicit", "null", "unnamed", or "default" pool over time. Regardless of the name, it is the pool that existed in Neutron before the subnet pool feature came to be.

The second subnet-create comes from a different pool, the one you named "pool". So, this bug gets in to what happens when we mix addresses from two different pools on the same network. Allocations from two different pools will never be checked for overlap.

I had thought about disallowing this but it didn't fit in the scope for Kilo. For now, please be advised that all subnets on the same network should come from the same pool until we can work out if and how it can work.

We should probably address this bug report by checking that all subnets on a network come from the same pool.

Changed in neutron:
importance: Undecided → Low
importance: Low → Medium
status: New → Confirmed
Changed in neutron:
assignee: Cedric Brandily (cbrandily) → nobody
Changed in neutron:
assignee: nobody → Ryan Tidwell (ryan-tidwell)
Changed in neutron:
milestone: none → liberty-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

Fix proposed to branch: master
Review: https://review.openstack.org/180299

Changed in neutron:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/180299
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=251f551a5fe8fe05cdc8c9b9cfad357245b39bb9
Submitter: Jenkins
Branch: master

commit 251f551a5fe8fe05cdc8c9b9cfad357245b39bb9
Author: Ryan Tidwell <email address hidden>
Date: Mon May 4 15:56:41 2015 -0700

    Block subnet create when a network hosts subnets allocated from different pools

    This change will ensure that all subnets with the same ip_version on a given
    network have been allocated from the same subnet pool or no pool. This
    provides cleaner subnet overlap detection.

    Change-Id: I3c7366c69b10c202c0511126fbee6b3aac36759e
    Closes-Bug: #1451559

Changed in neutron:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (neutron-pecan)

Fix proposed to branch: neutron-pecan
Review: https://review.openstack.org/185072

tags: added: kilo-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/kilo)

Fix proposed to branch: stable/kilo
Review: https://review.openstack.org/185753

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

Reviewed: https://review.openstack.org/185753
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=0c078f20a6a3d57d9b30b8dcab83741d9f42ccaf
Submitter: Jenkins
Branch: stable/kilo

commit 0c078f20a6a3d57d9b30b8dcab83741d9f42ccaf
Author: Ryan Tidwell <email address hidden>
Date: Mon May 4 15:56:41 2015 -0700

    Block subnet create when a network hosts subnets allocated from different pools

    This change will ensure that all subnets with the same ip_version on a given
    network have been allocated from the same subnet pool or no pool. This
    provides cleaner subnet overlap detection.

    Cherry-picked from 251f551a5fe8fe05cdc8c9b9cfad357245b39bb9

    Change-Id: I3c7366c69b10c202c0511126fbee6b3aac36759e
    Closes-Bug: #1451559

tags: added: in-stable-kilo
Thierry Carrez (ttx)
Changed in neutron:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: liberty-1 → 7.0.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.