Merge "NSX|P: Improve error handling for MP mdproxy port"

This commit is contained in:
Zuul 2020-03-03 16:48:48 +00:00 committed by Gerrit Code Review
commit a120f5cc43
1 changed files with 4 additions and 4 deletions

View File

@ -794,10 +794,10 @@ class NsxPolicyPlugin(nsx_plugin_common.NsxPluginV3Base):
self._create_net_mp_mdproxy_port( self._create_net_mp_mdproxy_port(
context, created_net, az, nsx_net_id) context, created_net, az, nsx_net_id)
except Exception as e: except Exception as e:
LOG.exception("Failed to create mdproxy port for network %s: " msg = ("Failed to complete network creation. error: %s" % e)
"%s", net_id, e) LOG.exception(msg)
with excutils.save_and_reraise_exception(): self.delete_network(context, net_id)
self.delete_network(context, net_id) raise nsx_exc.NsxPluginException(err_msg=msg)
# Update the QoS policy (will affect only future compute ports) # Update the QoS policy (will affect only future compute ports)
qos_com_utils.set_qos_policy_on_new_net( qos_com_utils.set_qos_policy_on_new_net(