]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mgr/smb: fix error handling for fundamental resource parsing 65631/head
authorJohn Mulligan <jmulligan@redhat.com>
Mon, 22 Sep 2025 17:38:24 +0000 (13:38 -0400)
committerJohn Mulligan <jmulligan@redhat.com>
Thu, 25 Sep 2025 14:58:48 +0000 (10:58 -0400)
commitd789764e7cb48ab9607bf271766e8259e13fc0b2
treee05f914307bfce875ded713f1d2b43669c57d622
parentd1afa9815c79cd359bcf9afd5503d3859a2606c2
mgr/smb: fix error handling for fundamental resource parsing

When an smb resource is input to the smb mgr module in YAML or JSON the
fundamental parsing/deserialization is handled by resourcelib. This
module tries to be largely independent of smb mgr module and defines a
few basic exception types. When these exception types were raised the
`ceph` command line would print out a long traceback. Avoid printing
a traceback by catching these errors with a new contextmanager
(decorator) that is automatically called when using the smb ceph
mgr command api.

Fixes: https://tracker.ceph.com/issues/71992
Signed-off-by: John Mulligan <jmulligan@redhat.com>
src/pybind/mgr/smb/cli.py