neutron/neutron
Slawek Kaplonski 0cc3032edc Make _ensure_default_security_group method atomic
Method _ensure_default_security_group wasn't atomic as it first tries to get
default SG and if that not exists in DB, it tries to create it.

It may happend, like e.g. in Calico plugin that between
get_default_sg_id method and create_security_group method, this default
SG will be created by other neutron worker. And in such case there will
be Duplicate entry exception raised.

So this patch is adding handling of such exception.

Conflicts:
    neutron/db/securitygroups_db.py

Change-Id: I515c310f221e7d9ae3be59a26260538d1bc591c2
Closes-Bug: #1883730
(cherry picked from commit 7019c5cf50)
2020-07-07 14:44:54 +00:00
..
agent Merge "Allow usage of legacy 3rd-party interface drivers" into stable/queens 2020-05-22 19:55:59 +00:00
api Adding LOG statements to debug 1838449 2020-05-13 21:34:53 +00:00
cmd Secure dnsmasq process against external abuse 2019-01-25 13:58:19 +00:00
common Add trunk subports to be one of dvr serviced device owners 2020-04-06 11:38:08 +00:00
conf Add accepted egress direct flow 2020-02-25 07:32:29 +08:00
core_extensions use qos constants from neutron-lib 2017-10-26 19:57:19 +00:00
db Make _ensure_default_security_group method atomic 2020-07-07 14:44:54 +00:00
debug Change ip_lib network namespace code to use pyroute2 2017-10-04 21:09:28 +00:00
extensions Improve invalid port ranges error message 2019-03-21 10:18:01 -04:00
hacking hacking: Remove dead code 2017-07-19 13:43:44 +02:00
ipam Add bulk IP address assignment to ipam driver 2020-03-26 12:31:05 +00:00
locale Imported Translations from Zanata 2018-03-14 06:20:49 +00:00
notifiers Refactor the L3 agent batch notifier 2020-04-20 11:45:35 +00:00
objects Improve VLAN allocations synchronization 2020-04-23 16:15:17 +00:00
pecan_wsgi Set DB retry for quota_enforcement pecan_wsgi hook 2019-12-16 11:16:23 +00:00
plugins Only notify nova of port status changes if configured 2020-05-15 19:14:06 +00:00
privileged Merge "Switch create/delete interfaces to pyroute2" into stable/queens 2020-04-28 17:18:33 +00:00
quota Set DB retry for quota_enforcement pecan_wsgi hook 2019-12-16 11:16:23 +00:00
scheduler Fetch specific columns rather than full ORM entities 2018-09-27 19:12:37 +02:00
server Re-use existing ProcessLauncher from wsgi in RPC workers 2020-02-20 09:39:20 +00:00
services Wait before deleting trunk bridges for DPDK vhu 2020-04-03 21:12:10 +00:00
tests Make _ensure_default_security_group method atomic 2020-07-07 14:44:54 +00:00
__init__.py
_i18n.py Make code follow log translation guideline 2017-08-14 02:01:48 +00:00
auth.py Use oslo.context class method to construct context object 2017-03-23 09:02:46 +00:00
manager.py Do not load default service plugins if core plugin is not DB based 2017-11-09 20:34:52 +00:00
neutron_plugin_base_v2.py Do not load default service plugins if core plugin is not DB based 2017-11-09 20:34:52 +00:00
opts.py Merge "Remove deprecated cache_url" 2018-01-03 06:35:59 +00:00
policy.py Treat networks shared by RBAC in same way as shared with all tenants 2019-06-28 06:05:44 +00:00
service.py Re-use existing ProcessLauncher from wsgi in RPC workers 2020-02-20 09:39:20 +00:00
version.py
worker.py replace WorkerSupportServiceMixin with neutron-lib's WorkerBase 2017-06-14 06:56:48 -06:00
wsgi.py Re-use existing ProcessLauncher from wsgi in RPC workers 2020-02-20 09:39:20 +00:00