]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Skip DBDuplicateEntry exception in security group creation
authorAnn Kamyshnikova <akamyshnikova@mirantis.com>
Fri, 13 Feb 2015 15:41:21 +0000 (18:41 +0300)
committerAnn Kamyshnikova <akamyshnikova@mirantis.com>
Tue, 17 Feb 2015 15:48:02 +0000 (18:48 +0300)
commitee2d52b0eb9a75df36c656462918c6f08955ad51
tree5fb9b14ba975d66e1ff36463302d76d3f1849b18
parent4f5917e9e9e0d67ed314485baf9101eebf602f88
Skip DBDuplicateEntry exception in security group creation

An DBDuplicateEntry expection appeared if it is attempted to
create secutity groups in more then one thread. In this situation
at one moment it is trying to be created 2 default security groups
which is not allowed. In this case exception should skipped with
a message about failed attempt.

Closes-bug: #1419723

Change-Id: Id6fe997ad3b72f875160e1e31a3dc17c3cc53b75
neutron/db/securitygroups_db.py
neutron/tests/unit/test_extension_security_group.py