Description of problem: `traceback` is dumped when unexpected input is provided for `format` argument (Tried xml) Version-Release number of selected component (if applicable): 16.2.0-117.el8cp How reproducible: Always Steps to Reproduce: 1. try ceph orch status --detail --format xml Actual results: # ceph orch status --detail --format xml Error EINVAL: Traceback (most recent call last): File "/usr/share/ceph/mgr/mgr_module.py", line 1345, in _handle_command return self.handle_command(inbuf, cmd) File "/usr/share/ceph/mgr/orchestrator/_interface.py", line 167, in handle_command return dispatch[cmd['prefix']].call(self, cmd, inbuf) File "/usr/share/ceph/mgr/mgr_module.py", line 386, in call kwargs = self._collect_args_by_argspec(cmd_dict) File "/usr/share/ceph/mgr/mgr_module.py", line 379, in _collect_args_by_argspec kwargs[k] = CephArgtype.cast_to(tp, v) File "/lib/python3.6/site-packages/ceph_argparse.py", line 243, in cast_to return tp(v) File "/lib64/python3.6/enum.py", line 293, in __call__ return cls.__new__(cls, value) File "/lib64/python3.6/enum.py", line 535, in __new__ return cls._missing_(value) File "/lib64/python3.6/enum.py", line 548, in _missing_ raise ValueError("%r is not a valid %s" % (value, cls.__name__)) ValueError: 'xml' is not a valid Format Expected results: Tracebacks are not expected to be dumped to user for cli call Additional info:
this might be a real issue: could you verify if other commands that do in fact support xml still properly work? ceph health --format xml
Issue fixed by the PR: https://github.com/ceph/ceph/pull/45023 In the new implementation an error is shown (option not implemented) instead of failing with a stacktrace.
Thanks for testing the fix. AFAIK, right now there are no plans to support xml format for this option.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Moderate: Red Hat Ceph Storage Security, Bug Fix, and Enhancement Update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2022:5997