subnet allocation does not scale

Bug #1382149 reported by Robert Kukura
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Group Based Policy
Triaged
High
Robert Kukura

Bug Description

In gbp/neutron/services/grouppolicy/drivers/resource_mapping.py, the _use_implicit_subnet method that allocates subnets for EPG/PTGs contains the following comment:

        # REVISIT(rkukura): This is a temporary allocation algorithm
        # that depends on an exception being raised when the subnet
        # being created is already in use. A DB allocation table for
        # the pool of subnets, or at least a more efficient way to
        # test if a subnet is in-use, may be needed.

The current trial-and-error approach slows down as the L3P's supernet becomes exhausted, and also results in lots of errors being logged. We probably need to implement allocation pools using the DB.

Robert Kukura (rkukura)
Changed in group-based-policy:
importance: Undecided → High
importance: High → Medium
description: updated
Changed in group-based-policy:
assignee: nobody → Robert Kukura (rkukura)
milestone: none → juno-release
Changed in group-based-policy:
status: New → Confirmed
Revision history for this message
Robert Kukura (rkukura) wrote :

I propose that we defer fixing this until our kilo-based release, and resolve it by having the resource_mapping driver map l3 policies to subnet pools as described in https://review.openstack.org/#/c/135771/.

Robert Kukura (rkukura)
Changed in group-based-policy:
milestone: juno-release → kilo-gbp-1
Changed in group-based-policy:
milestone: kilo-gbp-1 → kilo-gbp-2
Changed in group-based-policy:
milestone: kilo-gbp-2 → kilo-gbp-3
Changed in group-based-policy:
milestone: kilo-gbp-3 → kilo-gbp-4
importance: Medium → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to group-based-policy (master)

Reviewed: https://review.openstack.org/208059
Committed: https://git.openstack.org/cgit/stackforge/group-based-policy/commit/?id=0c303371ab9ba8bbd930dad8f4ea4c73b6b5cbb7
Submitter: Jenkins
Branch: master

commit 0c303371ab9ba8bbd930dad8f4ea4c73b6b5cbb7
Author: Ivar Lazzaro <email address hidden>
Date: Fri Jul 31 13:59:07 2015 -0700

    subnet allocation improvement

    This patch removes some code duplication on L3P pool subnet allocation
    and improves performances removing linear search in most
    cases. This is not a final solution for subnet allocation, which
    is deferred until we support Neutron's subnet pools, but it's a
    requirement for the upcoming TScP work.

    Partial-bug: 1382149
    Partially implements blueprint node-centric-chain-plugin

    Change-Id: I1ef8b377b3eee03158a0776406af4aa6ab27f5c8

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to group-based-policy (stable/juno)

Fix proposed to branch: stable/juno
Review: https://review.openstack.org/210555

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to group-based-policy (stable/juno)

Reviewed: https://review.openstack.org/210555
Committed: https://git.openstack.org/cgit/stackforge/group-based-policy/commit/?id=863a29451b543ed292f32dec10cda6b7a181fab8
Submitter: Jenkins
Branch: stable/juno

commit 863a29451b543ed292f32dec10cda6b7a181fab8
Author: Ivar Lazzaro <email address hidden>
Date: Fri Jul 31 13:59:07 2015 -0700

    subnet allocation improvement

    This patch removes some code duplication on L3P pool subnet allocation
    and improves performances removing linear search in most
    cases. This is not a final solution for subnet allocation, which
    is deferred until we support Neutron's subnet pools, but it's a
    requirement for the upcoming TScP work.

    Partial-bug: 1382149
    Partially implements blueprint node-centric-chain-plugin

    Change-Id: I1ef8b377b3eee03158a0776406af4aa6ab27f5c8
    (cherry picked from commit 0c303371ab9ba8bbd930dad8f4ea4c73b6b5cbb7)

tags: added: in-stable-juno
Changed in group-based-policy:
milestone: kilo-gbp-4 → next
Revision history for this message
Robert Kukura (rkukura) wrote :

Neutron subnet pools are implemented since kilo, and should now be mature enough to use. We need to decide whether to update GBP to use these for liberty, and then whether to back-port it to kilo.

Given that creating a pool when subnets within its CIDR are already in-use may be problematic, upgrades may require that the current subnet allocation approach continue to be used for existing L3Ps and subnet pools only be used for newly created L3Ps.

Changed in group-based-policy:
status: Confirmed → Triaged
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.