NSXV: ensure that binding update does not fail if deleted
A concurrent task may have deleted the router binding.
Change-Id: Icd5a64f7688c0a8389323deed84d7adf7c949006
(cherry picked from commit ba81638fcb
)
This commit is contained in:
parent
776da0c5b4
commit
ec75ff9581
|
@ -312,9 +312,13 @@ class EdgeManager(object):
|
|||
|
||||
def _delete_backup_edges_on_db(self, context, backup_router_bindings):
|
||||
for binding in backup_router_bindings:
|
||||
nsxv_db.update_nsxv_router_binding(
|
||||
context.session, binding['router_id'],
|
||||
status=plugin_const.PENDING_DELETE)
|
||||
try:
|
||||
nsxv_db.update_nsxv_router_binding(
|
||||
context.session, binding['router_id'],
|
||||
status=plugin_const.PENDING_DELETE)
|
||||
except db_base_exc.NoResultFound:
|
||||
LOG.debug("Router binding %s does not exist.",
|
||||
binding['router_id'])
|
||||
|
||||
def _delete_backup_edges_at_backend(self, context, backup_router_bindings):
|
||||
for binding in backup_router_bindings:
|
||||
|
|
Loading…
Reference in New Issue