On Tue, Sep 22, 2026 at 3:31 PM Terry Wilson <[email protected]> wrote:
>
> Port of C commit d6db7b3cc4bc ("ovsdb: add support for role-based access
> controls").  Give "not allowed" its own case in the per-operation error
> chain, matching ovsdb_idl_txn_process_reply().  It already fell into the
> catch-all branch and was already a hard error, so this is for clarity and
> to keep the chain aligned with C, which deliberately does not log a
> warning for it.
>
> Log a warning for any other unrecognized (non-"aborted") per-operation
> error, as C does.  Such errors were already recorded on the transaction
> by __set_error_json() and already counted as hard errors; the warning is
> the only new behavior.
>
> Assisted-by: Claude Opus 4.8
> Signed-off-by: Terry Wilson <[email protected]>
> ---
>  python/ovs/db/idl.py | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/python/ovs/db/idl.py b/python/ovs/db/idl.py
> index dafeaff26..5de8a1dea 100644
> --- a/python/ovs/db/idl.py
> +++ b/python/ovs/db/idl.py
> @@ -2270,11 +2270,14 @@ class Transaction(object):
>                              soft_errors = True
>                          elif error == "not owner":
>                              lock_errors = True
> -                        elif error == "aborted":
> -                            pass
> -                        else:
> +                        elif error == "not allowed":
> +                            hard_errors = True
> +                            self.__set_error_json(op)
> +                        elif error != "aborted":
>                              hard_errors = True
>                              self.__set_error_json(op)
> +                            # XXX rate-limit
> +                            vlog.warn("transaction error: %s" % self._error)
>                  else:
>                      hard_errors = True
>                      self.__set_error_json(op)
> --
> 2.55.0
>
Fixes: d6db7b3cc4bc ("ovsdb: add support for role-based access controls")

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to