diff --git a/ovsdbapp/backend/ovs_idl/transaction.py b/ovsdbapp/backend/ovs_idl/transaction.py index 091b6b83..403d0f72 100644 --- a/ovsdbapp/backend/ovs_idl/transaction.py +++ b/ovsdbapp/backend/ovs_idl/transaction.py @@ -91,10 +91,17 @@ class Transaction(api.Transaction): {'idx': i, 'cmd': command, 'n': attempts}) try: command.run_idl(txn) - except Exception: + except Exception as e: txn.abort() if self.check_error: raise + if self.log_errors: + LOG.error("txn n=%(n)d command(idx=%(idx)s): %(cmd)s ", + "aborted due to error: %(err)s", + {'idx': i, + 'cmd': command, + 'n': attempts, + 'err': e}) status = txn.commit_block() if status == txn.TRY_AGAIN: LOG.debug("OVSDB transaction returned TRY_AGAIN, retrying")