Concurrent security groups creation fails with DBDuplicateEntry

Bug #1625557 reported by Oleg Bondarev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
High
Oleg Bondarev

Bug Description

 - create_security_group() is wrapped with a db retry decorator
 - it calls _ensure_default_security_group() to create a default security group for a tenant if one does not exist
 - _ensure_default_security_group() in turn calls back to create_security_group() to create a default security group
 - due to concurrency the creation of default security group my fail with DBDuplicateEntry
 - this is retried for max attempts and the request eventually fails

Traceback: http://paste.openstack.org/show/581903/
Example of failed job in rally: http://logs.openstack.org/04/371604/1/check/gate-rally-dsvm-neutron-rally/b1c384d/

Changed in neutron:
status: New → In Progress
Revision history for this message
Oleg Bondarev (obondarev) wrote :
tags: added: newton-rc-potential
Changed in neutron:
milestone: none → newton-rc2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/373108
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=5ad5d103ad02e2787a539c82b0efcbe51cfe857c
Submitter: Jenkins
Branch: master

commit 5ad5d103ad02e2787a539c82b0efcbe51cfe857c
Author: Oleg Bondarev <email address hidden>
Date: Tue Sep 20 12:54:50 2016 +0300

    Do not retry default security group creation

    No need to retry creation of a default security group - it will
    always fail with DBDuplicate

    Closes-Bug: #1625557
    Change-Id: I8af479ff9631851e7d78c4fc28e8363eda848775

Changed in neutron:
status: In Progress → Fix Released
Revision history for this message
Armando Migliaccio (armando-migliaccio) wrote :

Patch is being reverted.

Changed in neutron:
status: Fix Released → Confirmed
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/373841

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/373841
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=09d1185d24c30690358a9314c14fabaead2f4c78
Submitter: Jenkins
Branch: master

commit 09d1185d24c30690358a9314c14fabaead2f4c78
Author: Oleg Bondarev <email address hidden>
Date: Wed Sep 21 10:36:05 2016 +0300

    Do not retry default security group creation

    No need to retry creation of a default security group - it will
    always fail with DBDuplicate.
    The patch opens a transaction before calling to create_security_group()
    when creating default security group, thus avoiding db retries.

    Closes-Bug: #1625557
    Change-Id: Id15b55b097641325ac68275fe4bb3ebe93718cdd

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

Fix proposed to branch: stable/newton
Review: https://review.openstack.org/374325

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

Reviewed: https://review.openstack.org/374325
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=91d233e26bc4dc8f2e88ab6830b255a6f4394666
Submitter: Jenkins
Branch: stable/newton

commit 91d233e26bc4dc8f2e88ab6830b255a6f4394666
Author: Oleg Bondarev <email address hidden>
Date: Wed Sep 21 10:36:05 2016 +0300

    Do not retry default security group creation

    No need to retry creation of a default security group - it will
    always fail with DBDuplicate.
    The patch opens a transaction before calling to create_security_group()
    when creating default security group, thus avoiding db retries.

    Closes-Bug: #1625557
    Change-Id: Id15b55b097641325ac68275fe4bb3ebe93718cdd
    (cherry picked from commit 09d1185d24c30690358a9314c14fabaead2f4c78)

tags: added: in-stable-newton
tags: added: db
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 9.0.0.0rc2

This issue was fixed in the openstack/neutron 9.0.0.0rc2 release candidate.

tags: removed: newton-rc-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 10.0.0.0b1

This issue was fixed in the openstack/neutron 10.0.0.0b1 development milestone.

tags: added: neutron-proactive-backport-potential
tags: removed: neutron-proactive-backport-potential
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.