On Tue, Sep 22, 2026 at 3:31 PM Terry Wilson <[email protected]> wrote:
>
> Port of C commit 1b1d2e6daa56 ("ovsdb: Introduce experimental support for
> clustered databases"). A top-level JSON-RPC error reply of "canceled"
> means ovsdb-server aborted the transaction because the database in
> question was removed, converted, etc.; treat it as TRY_AGAIN rather than a
> hard error. For any other top-level error, and for a reply that is not a
> JSON array, record the offending JSON on the transaction so the client can
> inspect it.
>
> Assisted-by: Claude Opus 4.8
> Signed-off-by: Terry Wilson <[email protected]>
> ---
> python/ovs/db/idl.py | 11 ++++++++++-
> 1 file changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/python/ovs/db/idl.py b/python/ovs/db/idl.py
> index 5de8a1dea..4d0b7ac38 100644
> --- a/python/ovs/db/idl.py
> +++ b/python/ovs/db/idl.py
> @@ -2240,10 +2240,19 @@ class Transaction(object):
>
> def _process_reply(self, msg):
> if msg.type == ovs.jsonrpc.Message.T_ERROR:
> - self._status = Transaction.ERROR
> + if msg.error == "canceled":
> + # ovsdb-server uses this error message to indicate that the
> + # transaction was canceled because the database in question
> was
> + # removed, converted, etc.
> + self._status = Transaction.TRY_AGAIN
> + else:
> + self._status = Transaction.ERROR
> + self.__set_error_json(msg.error)
> elif not isinstance(msg.result, (list, tuple)):
> # XXX rate-limit
> vlog.warn('reply to "transact" is not JSON array')
> + self._status = Transaction.ERROR
> + self.__set_error_json(msg.result)
> else:
> hard_errors = False
> soft_errors = False
> --
> 2.55.0
>
Fixes: 1b1d2e6daa56 ("ovsdb: Introduce experimental support for
clustered databases")
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev