Reraise retriable errors in ensure_tenant
Change-Id: I5851a4d7b92137c652cdc7f30a026a7314fc8afa
This commit is contained in:
parent
eaf16ba376
commit
487eb4bc36
|
@ -78,7 +78,13 @@ class MechanismManager(managers.MechanismManager):
|
|||
if isinstance(driver.obj, driver_api.MechanismDriver):
|
||||
try:
|
||||
driver.obj.ensure_tenant(plugin_context, tenant_id)
|
||||
except Exception:
|
||||
except Exception as e:
|
||||
if db_api.is_retriable(e):
|
||||
with excutils.save_and_reraise_exception():
|
||||
LOG.debug("DB exception raised by Mechanism "
|
||||
"driver '%(name)s' in ensure_tenant",
|
||||
{'name': driver.name},
|
||||
exc_info=e)
|
||||
LOG.exception("Mechanism driver '%s' failed in "
|
||||
"ensure_tenant", driver.name)
|
||||
raise ml2_exc.MechanismDriverError(method="ensure_tenant")
|
||||
|
|
Loading…
Reference in New Issue