NoNetworkFoundInMaximumAllowedAttempts during concurrent network creation

Bug #1454434 reported by Eugene Nikanorov
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Medium
Eugene Nikanorov
Juno
Fix Released
Undecided
Unassigned
Kilo
New
Undecided
Unassigned

Bug Description

NoNetworkFoundInMaximumAllowedAttempts could be thrown if networks are created by multiple threads simultaneously.
This is related to https://bugs.launchpad.net/bugs/1382064
Currently DB logic works correctly, however 11 attempts that code does right now might not be enough in some rare unlucky cases under extreme concurrency.

We need to randomize segmentation_id selection to avoid such issues.

tags: added: db
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/182901

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

Reviewed: https://review.openstack.org/182901
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=1d9fd2aec00cb85034e5a23cc1beac33c74e0110
Submitter: Jenkins
Branch: master

commit 1d9fd2aec00cb85034e5a23cc1beac33c74e0110
Author: Eugene Nikanorov <email address hidden>
Date: Mon May 11 01:34:35 2015 +0400

    Randomize tunnel id query to avoid contention

    When networks are created rapidly, neutron-servers compete
    for segmentation ids which creates too much contention and
    may lead to inability to choose available id in hardcoded amount
    of attempts (11)
    Randomize tunnel id selection so that condition is not hit.

    Change-Id: I7068f90fe4927e6e693f8a62cb704213b2da2920
    Related-Bug: #1382064
    Closes-Bug: #1454434

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

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/188994

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

Reviewed: https://review.openstack.org/188994
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=9bc323316a27676859280c9ee413a791c386ac64
Submitter: Jenkins
Branch: stable/kilo

commit 9bc323316a27676859280c9ee413a791c386ac64
Author: Eugene Nikanorov <email address hidden>
Date: Mon May 11 01:34:35 2015 +0400

    Randomize tunnel id query to avoid contention

    When networks are created rapidly, neutron-servers compete
    for segmentation ids which creates too much contention and
    may lead to inability to choose available id in hardcoded amount
    of attempts (11)
    Randomize tunnel id selection so that condition is not hit.

    Change-Id: I7068f90fe4927e6e693f8a62cb704213b2da2920
    Related-Bug: #1382064
    Closes-Bug: #1454434
    (cherry picked from commit 1d9fd2aec00cb85034e5a23cc1beac33c74e0110)

tags: added: in-stable-kilo
Thierry Carrez (ttx)
Changed in neutron:
milestone: none → liberty-1
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/juno)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on neutron (stable/juno)

Change abandoned by stephen-ma (<email address hidden>) on branch: stable/juno
Review: https://review.openstack.org/195792

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

Reviewed: https://review.openstack.org/195792
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=07d3d4401f34a19b23738296c189122eeef9150f
Submitter: Jenkins
Branch: stable/juno

commit 07d3d4401f34a19b23738296c189122eeef9150f
Author: Eugene Nikanorov <email address hidden>
Date: Mon May 11 01:34:35 2015 +0400

    Randomize tunnel id query to avoid contention

    When networks are created rapidly, neutron-servers compete
    for segmentation ids which creates too much contention and
    may lead to inability to choose available id in hardcoded amount
    of attempts (11)
    Randomize tunnel id selection so that condition is not hit.

    (cherry picked from commit 1d9fd2aec00cb85034e5a23cc1beac33c74e0110)
    Conflicts:
            neutron/plugins/ml2/drivers/helpers.py

    Related-Bug: #1382064
    Closes-Bug: #1454434
    Change-Id: I7068f90fe4927e6e693f8a62cb704213b2da2920

tags: added: in-stable-juno
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.