Port of C commit d6db7b3cc06f ("ovsdb: add support for role-based access
controls"). A per-operation "not allowed" error is a hard error, and any
other unrecognized (non-"aborted") per-operation error is now recorded on
the transaction and logged as "transaction error" rather than being
silently ignored.
Assisted-by: Claude Opus 4.8 <[email protected]>
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 07068407d..30bc6cb44 100644
--- a/python/ovs/db/idl.py
+++ b/python/ovs/db/idl.py
@@ -2269,11 +2269,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.49.0
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev