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.
Bug 1596699 - Traceback when you rhsm-debug system --destination=/home/tmp-dir --no-archive when the file doesnt exist
Summary: Traceback when you rhsm-debug system --destination=/home/tmp-dir --no-archive...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: subscription-manager
Version: 7.6
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: rc
: ---
Assignee: Nikos Moumoulidis
QA Contact: Red Hat subscription-manager QE Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-06-29 13:28 UTC by Shwetha Kallesh
Modified: 2018-10-30 10:38 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-10-30 10:37:37 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github candlepin subscription-manager pull 1905 0 None closed 1596699: Handle non-existant rhsm-debug destination (ENT-780) 2020-11-09 13:48:07 UTC
Red Hat Product Errata RHBA-2018:3153 0 None None None 2018-10-30 10:38:05 UTC

Description Shwetha 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:

Comment 3 John Sefler 2018-08-21 17:29:37 UTC
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.

Comment 5 Shwetha Kallesh 2018-09-05 08:54:26 UTC
[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.

Comment 7 errata-xmlrpc 2018-10-30 10:37:37 UTC
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


Note You need to log in before you can comment on or make changes to this bug.