]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Return port context from _bind_port_if_needed
authorEugene Nikanorov <enikanorov@mirantis.com>
Sun, 10 Aug 2014 18:54:37 +0000 (22:54 +0400)
committerEugene Nikanorov <enikanorov@mirantis.com>
Mon, 11 Aug 2014 07:47:04 +0000 (11:47 +0400)
Previously port was returned causing exception being thrown
in rpc handling code.

Change-Id: Iba498d0600d625f0469392b99ac0bc8c1f1ecff7
Closes-Bug: #1354912

neutron/plugins/ml2/plugin.py

index 4d789ba89d0c2bbb48b346facd7bda7adcd12819..f92b60fa5bf2b7c3fe0c82b9f9d627c6bdf2de13 100644 (file)
@@ -323,7 +323,9 @@ class Ml2Plugin(db_base_plugin_v2.NeutronDbPluginV2,
                 # The port has been deleted concurrently, so just
                 # return the unbound result from the initial
                 # transaction that completed before the deletion.
-                return context._port
+                LOG.debug("Port %s has been deleted concurrently",
+                          port_id)
+                return context
             # Need to notify if we succeed and our results were
             # committed.
             if did_commit and (new_context._binding.vif_type !=