NSX|V3+P: Create default SG outside the port create context
Change-Id: I6e32a0bb1a592e681b124a38ca59771f719af398
This commit is contained in:
parent
0610b6a140
commit
15d7f1a267
@ -2088,6 +2088,11 @@ class NsxPolicyPlugin(nsx_plugin_common.NsxPluginV3Base):
|
||||
if is_external_net:
|
||||
self._assert_on_external_net_with_compute(port_data)
|
||||
|
||||
# Do this outside of the context writer scope so it can overcome
|
||||
# failures
|
||||
if port.get('tenant_id'):
|
||||
self._ensure_default_security_group(context, port['tenant_id'])
|
||||
|
||||
with db_api.CONTEXT_WRITER.using(context):
|
||||
neutron_db = self.base_create_port(context, port)
|
||||
port["port"].update(neutron_db)
|
||||
|
@ -1463,6 +1463,11 @@ class NsxV3Plugin(nsx_plugin_common.NsxPluginV3Base,
|
||||
context, port_data, port_data['network_id'],
|
||||
projectpluginmap.NsxPlugins.NSX_T)
|
||||
|
||||
# Do this outside of the context writer scope so it can overcome
|
||||
# failures
|
||||
if port.get('tenant_id'):
|
||||
self._ensure_default_security_group(context, port['tenant_id'])
|
||||
|
||||
with db_api.CONTEXT_WRITER.using(context):
|
||||
neutron_db = self.base_create_port(context, port)
|
||||
port["port"].update(neutron_db)
|
||||
|
Loading…
x
Reference in New Issue
Block a user