]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Avoid dhcp agent race condition on subnet and network delete
authorarmando-migliaccio <amigliaccio@nicira.com>
Fri, 13 Sep 2013 18:26:18 +0000 (11:26 -0700)
committerGerrit Code Review <review@openstack.org>
Fri, 22 Nov 2013 21:51:45 +0000 (21:51 +0000)
commit6a5b3f4dd65e6b94c9909b5351d100a8e7b4ae35
tree74b3e78630df706db978134d2f73a2ed6fcb5a69
parentf0bd2ddb40d1dc85936bfb6a46cedc3f548af360
Avoid dhcp agent race condition on subnet and network delete

Ensure that ports that are about to be deleted are 'selected
for update'. By doing so, we avoid a race condition between
subnet and network delete operations carried out by two
separate server instances.

A race caused by the dhcp agent deleting the DHCP port
(caused by a subnet-delete event notification) can
still occur and will be addressed in a subsequent patch.

delete_subnet's way to delete ports has been tweaked to
ensure that postgres db can handle the SELECT FOR UPDATE
correctly.

Partial-Bug:1197627

Change-Id: I5bd75a758395a2faeff9db35a03c42dfa8ae0eab
neutron/db/db_base_plugin_v2.py