Bug 2189625
Summary: | Traceback for InvalidCLIOptionError is thrown by rhsm-debug system with negative option values | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 9 | Reporter: | John Sefler <jsefler> |
Component: | subscription-manager | Assignee: | Pino Toscano <ptoscano> |
Status: | CLOSED ERRATA | QA Contact: | Red Hat subscription-manager QE Team <rhsm-qe> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 9.3 | Keywords: | AutoVerified, Regression, Triaged |
Target Milestone: | rc | ||
Target Release: | 9.3 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | subscription-manager-1.29.35-1.el9 | Doc Type: | No Doc Update |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2023-11-07 08:51:53 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
John Sefler
2023-04-25 17:50:17 UTC
The same issue happens with... [root@kvm-02-guest13 ~]# rhsm-debug system --destination=/dev/null --no-archive Traceback (most recent call last): File "/usr/bin/rhsm-debug", line 33, in <module> sys.exit(load_entry_point('subscription-manager==1.29.34', 'console_scripts', 'rhsm-debug')()) File "/usr/lib64/python3.9/site-packages/subscription_manager/scripts/rhsm_debug.py", line 46, in main return RhsmDebugCLI().main() File "/usr/lib64/python3.9/site-packages/subscription_manager/cli.py", line 197, in main return cmd.main() File "/usr/lib64/python3.9/site-packages/subscription_manager/cli_command/cli.py", line 443, in main raise err File "/usr/lib64/python3.9/site-packages/subscription_manager/cli_command/cli.py", line 412, in main return_code = self._do_command() File "/usr/lib64/python3.9/site-packages/rhsm_debug/debug_commands.py", line 129, in _do_command self._validate_options() File "/usr/lib64/python3.9/site-packages/rhsm_debug/debug_commands.py", line 119, in _validate_options raise InvalidCLIOptionError(msg) subscription_manager.cli.InvalidCLIOptionError: To use the no-archive option, the destination directory '/dev/null' must exist on the same file system as the data assembly directory '/var/spool/rhsm/debug'. Expected results: Same as RHEL-9.2... [root@kvm-03-guest21 ~]# rhsm-debug system --destination=/dev/null --no-archive To use the no-archive option, the destination directory '/dev/null' must exist on the same file system as the data assembly directory '/var/spool/rhsm/debug'. [root@kvm-03-guest21 ~]# echo $? 0 Thanks for the report; this is a regression in the handling of invalid command line options in tools different than 'subscription-manager'. Sent a PR to hopefully fix it: https://github.com/candlepin/subscription-manager/pull/3251 Note: as result of this, the return value of 'rhsm-debug' for invalid command line options will change from 0 to 1: while this can be seen as behaviour change, I'd argue that errors ought to not cause a clean exit. 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 (subscription-manager 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/RHBA-2023:6606 |