]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Catch ObjectDeletedError and skip port or subnet removal
authorEugene Nikanorov <enikanorov@mirantis.com>
Sat, 9 May 2015 18:56:44 +0000 (22:56 +0400)
committerEugene Nikanorov <enikanorov@mirantis.com>
Mon, 11 May 2015 00:30:11 +0000 (04:30 +0400)
commitdcc9840684de11835625730aeca10aeaf416929b
tree326b4c82ae7cced75df71f48dc87b93d7c7070cf
parent0933f26b2c9772c457bb259cff7c8f648d29f620
Catch ObjectDeletedError and skip port or subnet removal

When network is deleted service ports are deleted in the scope of
delete_network. Service ports could also be deleted by other entities
such as DHCP agent releasing dhcp port.
That could rarely lead to a race condition when port object used in
_delete_ports helper is already deleted causing ObjectDeletedError
exception.
Need to handle it and prevent object deletion in that case.

Change-Id: I531251d3211545c82a5bb7a471b7915da9b763b7
Closes-Bug: #1454408
neutron/plugins/ml2/plugin.py
neutron/tests/unit/plugins/ml2/test_plugin.py