]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Retry port status update on StaleDataError
authorKevin Benton <blak111@gmail.com>
Tue, 16 Jun 2015 06:10:09 +0000 (23:10 -0700)
committerKevin Benton <blak111@gmail.com>
Mon, 22 Jun 2015 03:14:42 +0000 (20:14 -0700)
commit3c72832c8b84af673722a34bba25eefc82154b47
tree1495696c9a84efa92cc19c12321c315a01dd0d82
parent4e77442d529d9803ff90de905b846af940eaf382
Retry port status update on StaleDataError

During update_port_status, a port may be concurrently updated/deleted
by another process, which will result in a StaleDataError being
thrown. In the event it was an update, we want to retry to make sure
the port status is set to the desired state so third parties like Nova
get notified.

This patch uses the oslo_db wrap_db_retry decorator after converting
the StaleDataError into a RetryRequest that the decorator can catch.

Closes-Bug: #1465407
Change-Id: I0a9230d30f435ec3d48f033136e85c40ad489ef9
neutron/db/api.py
neutron/plugins/ml2/plugin.py