Log DB exception if VIF creation fails
If there is a DBError raised during VIF creation it is nearly impossible to debug since all exception information is lost. This logs the exception to aid in debugging. Note that this exception should only be raised if something is really wrong so this should not spam a normal setup. Change-Id: Ifed88c981cc9d564a7443744bf298677a0782cee
This commit is contained in:
parent
a4b9dad79d
commit
3df3603150
@ -1521,6 +1521,7 @@ def virtual_interface_create(context, values):
|
||||
vif_ref.update(values)
|
||||
vif_ref.save(context.session)
|
||||
except db_exc.DBError:
|
||||
LOG.exception(_LE("VIF creation failed with a database error."))
|
||||
raise exception.VirtualInterfaceCreateException()
|
||||
|
||||
return vif_ref
|
||||
|
Loading…
x
Reference in New Issue
Block a user