From 01e7f29d13a12b56a59a97de3d1be13dc86fea52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Jedin=C3=BD?= Date: Fri, 8 Jun 2018 00:02:14 +0200 Subject: [PATCH] Do not fail in ensure_default_security_group There can be situation where the default SG is created in the meantime on other config node. Change-Id: Ie9227008e3781f9ed4d4e1a1eb9398aff91c2d48 Closes-Bug: #1775716 --- src/config/vnc_openstack/vnc_openstack/__init__.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/config/vnc_openstack/vnc_openstack/__init__.py b/src/config/vnc_openstack/vnc_openstack/__init__.py index 35b3142e62a..98a8eb3fbef 100644 --- a/src/config/vnc_openstack/vnc_openstack/__init__.py +++ b/src/config/vnc_openstack/vnc_openstack/__init__.py @@ -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