Skip to content

Commit

Permalink
Do not fail in ensure_default_security_group
Browse files Browse the repository at this point in the history
There can be situation where the default SG is created in the
meantime on other config node.

Change-Id: Ie9227008e3781f9ed4d4e1a1eb9398aff91c2d48
Closes-Bug: #1775716
  • Loading branch information
pjediny committed Jun 7, 2018
1 parent 0290a62 commit 01e7f29
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/config/vnc_openstack/vnc_openstack/__init__.py
Expand Up @@ -209,7 +209,12 @@ def ensure_default_security_group(vnc_lib, proj_obj):
for sg_group in sg_groups or []:
if sg_group['to'][-1] == 'default':
return
_create_default_security_group(vnc_lib, proj_obj)
try:
_create_default_security_group(vnc_lib, proj_obj)
except vnc_api.RefsExistError:
# Created by different worker/node
# so we can ignore the RefsExistError exception
pass


openstack_driver = None
Expand Down

0 comments on commit 01e7f29

Please sign in to comment.