]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Remove locking from network and subnet delete op
authorrossella <rsblendido@suse.com>
Tue, 19 Aug 2014 17:41:16 +0000 (19:41 +0200)
committerRossella Sblendido <rsblendido@suse.com>
Tue, 16 Dec 2014 13:51:02 +0000 (13:51 +0000)
commit532cd91fa79f6061399a1bf326a49c5e6f5ece6b
tree6e749f21722f3538c623f0437d3198b0f07dddf1
parent1afe7bfad9190564e2bc651ccc657121a5d6a0f0
Remove locking from network and subnet delete op

delete_subnet in Ml2 plugin instead of using SELECT FOR
UPDATE deletes the IPAllocations that can be auto-deleted
straight away.
An exception is raised if there are ports that cannot be
autodeleted.

delete_network in ML2 plugin tries to delete all ports
and subnets before performing the network deletion.
No lock is needed here - if some other process modifies
the Port or Subnet table, adding new items, the network
deletion will fail because of a violation of a foreign
key contraint.
In that case the operation will be retried.

Change-Id: Ib4e9441a95d6c80b92a43d55fdeb18d7b51a1cf3
Closes-bug: #1332917
neutron/plugins/ml2/plugin.py