The call to l3plugin.disassociate_floatingips() trigggers several events
that could cause a timeout to occur trying to query the db for the port
therefore this patch changes the code to query first for the port.
Closes-bug: #
1290478
Change-Id: I69fe9cff4b550240215329e1082a63cd11617faa
session = context.session
with session.begin(subtransactions=True):
- if l3plugin:
- l3plugin.disassociate_floatingips(context, id)
try:
port_db = (session.query(models_v2.Port).
enable_eagerloads(False).
self._delete_port_binding(mech_context)
self._delete_port_security_group_bindings(context, id)
LOG.debug(_("Calling base delete_port"))
+ if l3plugin:
+ l3plugin.disassociate_floatingips(context, id)
+
super(Ml2Plugin, self).delete_port(context, id)
try: