Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
DescriptionShwetha Kallesh
2018-06-29 13:28:26 UTC
Description of problem:
Traceback when you rhsm-debug system --destination=/home/tmp-dir --no-archive when the file doesnt exist
Version-Release number of selected component (if applicable):
[root@localhost ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 2.3.8-1
subscription management rules: 5.26
subscription-manager: 1.21.5-5.el7
How reproducible:
Steps to Reproduce:
[root@localhost ~]# rhsm-debug system --destination=/home/tmp-dir --no-archive
Traceback (most recent call last):
File "/usr/bin/rhsm-debug", line 9, in <module>
load_entry_point('subscription-manager==1.21.5', 'console_scripts', 'rhsm-debug')()
File "/usr/lib64/python2.7/site-packages/subscription_manager/scripts/rhsm_debug.py", line 57, in main
return RhsmDebugCLI().main()
File "/usr/lib64/python2.7/site-packages/subscription_manager/cli.py", line 183, in main
return cmd.main()
File "/usr/lib64/python2.7/site-packages/subscription_manager/managercli.py", line 499, in main
return_code = self._do_command()
File "/usr/lib64/python2.7/site-packages/rhsm_debug/debug_commands.py", line 108, in _do_command
self._validate_options()
File "/usr/lib64/python2.7/site-packages/rhsm_debug/debug_commands.py", line 94, in _validate_options
if not self._dirs_on_same_device(self.assemble_path, self.options.destination):
File "/usr/lib64/python2.7/site-packages/rhsm_debug/debug_commands.py", line 104, in _dirs_on_same_device
return os.stat(dir1).st_dev == os.stat(dir2).st_dev
OSError: [Errno 2] No such file or directory: '/home/tmp-dir'
Actual results:
traceback
Expected results:
no traceback , but display a message saying "File mentioned in --destination doesnot exist" or something similar
Additional info:
For reference, here is the behavior of this test on a RHEL6 system...
[root@jsefler-rhel6 ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.10 (Santiago)
[root@jsefler-rhel6 ~]# rpm -q subscription-manager
subscription-manager-1.20.10-7.el6.x86_64
[root@jsefler-rhel6 ~]#
[root@jsefler-rhel6 ~]# rhsm-debug system --destination=/home/tmp-dir --no-archive
Error collecting rhsm-debug information: [Errno 2] No such file or directory: '/home/tmp-dir'
[root@jsefler-rhel6 ~]#
Notice no Traceback. Instead the file not found error is handled graciously.
[root@hp-dl380pgen8-02-vm-9 ~]# subscription-manager version
server type: This system is currently not registered.
subscription management server: 2.3.9-1
subscription management rules: 5.26
subscription-manager: 1.21.9-1.el7
[root@hp-dl380pgen8-02-vm-9 ~]# rhsm-debug system --destination=/home/tmp-dir --no-archive
The directory specified by '--destination' must already exist.
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, 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-2018:3153
Description of problem: Traceback when you rhsm-debug system --destination=/home/tmp-dir --no-archive when the file doesnt exist Version-Release number of selected component (if applicable): [root@localhost ~]# subscription-manager version server type: Red Hat Subscription Management subscription management server: 2.3.8-1 subscription management rules: 5.26 subscription-manager: 1.21.5-5.el7 How reproducible: Steps to Reproduce: [root@localhost ~]# rhsm-debug system --destination=/home/tmp-dir --no-archive Traceback (most recent call last): File "/usr/bin/rhsm-debug", line 9, in <module> load_entry_point('subscription-manager==1.21.5', 'console_scripts', 'rhsm-debug')() File "/usr/lib64/python2.7/site-packages/subscription_manager/scripts/rhsm_debug.py", line 57, in main return RhsmDebugCLI().main() File "/usr/lib64/python2.7/site-packages/subscription_manager/cli.py", line 183, in main return cmd.main() File "/usr/lib64/python2.7/site-packages/subscription_manager/managercli.py", line 499, in main return_code = self._do_command() File "/usr/lib64/python2.7/site-packages/rhsm_debug/debug_commands.py", line 108, in _do_command self._validate_options() File "/usr/lib64/python2.7/site-packages/rhsm_debug/debug_commands.py", line 94, in _validate_options if not self._dirs_on_same_device(self.assemble_path, self.options.destination): File "/usr/lib64/python2.7/site-packages/rhsm_debug/debug_commands.py", line 104, in _dirs_on_same_device return os.stat(dir1).st_dev == os.stat(dir2).st_dev OSError: [Errno 2] No such file or directory: '/home/tmp-dir' Actual results: traceback Expected results: no traceback , but display a message saying "File mentioned in --destination doesnot exist" or something similar Additional info: