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 747024 - traceback when calling subscription-manager config
Summary: traceback when calling subscription-manager config
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: subscription-manager
Version: 6.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Adrian Likins
QA Contact: IDM QE LIST
URL:
Whiteboard:
Depends On:
Blocks: rhsm-rhel62
TreeView+ depends on / blocked
 
Reported: 2011-10-18 15:26 UTC by John Sefler
Modified: 2013-01-10 10:57 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-12-06 17:26:02 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1695 0 normal SHIPPED_LIVE subscription-manager bug fix and enhancement update 2011-12-06 01:23:29 UTC

Description John Sefler 2011-10-18 15:26:54 UTC
Description of problem:
This may be a corner case, but it is also regression in behavior...
Something has verify recently changed to affect the subscription-manager output from the following....

[root@jsefler-onprem-62server ~]# subscription-manager config --remove=non-existing-section.parameter
exception caught in subscription-manager
[root@jsefler-onprem-62server ~]# 


Prior output was...
[root@jsefler-onprem-62server ~]# subscription-manager config --remove=non-existing-section.parameter
No section: 'non-existing-section'



[root@jsefler-onprem-62server ~]# tail -f /var/log/rhsm/rhsm.log
2011-10-18 11:14:08,092 [INFO]  @connection.py:350 - Using certificate authentication: key = /etc/pki/consumer/key.pem, cert = /etc/pki/consumer/cert.pem, ca = /etc/rhsm/ca/, insecure = False
2011-10-18 11:14:08,094 [DEBUG]  @connection.py:188 - Loading CA PEM certificates from: /etc/rhsm/ca/
2011-10-18 11:14:08,094 [DEBUG]  @connection.py:171 - Loading CA certificate: '/etc/rhsm/ca/candlepin-stage.pem'
2011-10-18 11:14:08,094 [DEBUG]  @connection.py:171 - Loading CA certificate: '/etc/rhsm/ca/jsefler-onprem-62candlepin.pem'
2011-10-18 11:14:08,095 [DEBUG]  @connection.py:171 - Loading CA certificate: '/etc/rhsm/ca/redhat-uep.pem'
2011-10-18 11:14:08,096 [WARNING]  @connection.py:383 - Error fetching supported resources, this UEPConnection is likely not usable:
2011-10-18 11:14:08,096 [ERROR]  @connection.py:385 - No such file or directory
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/rhsm/connection.py", line 376, in _load_supported_resources
    resources_list = self.conn.request_get("/")
  File "/usr/lib/python2.6/site-packages/rhsm/connection.py", line 252, in request_get
    return self._request("GET", method)
  File "/usr/lib/python2.6/site-packages/rhsm/connection.py", line 191, in _request
    context.load_cert(self.cert_file, keyfile=self.key_file)
  File "/usr/lib64/python2.6/site-packages/M2Crypto/SSL/Context.py", line 76, in load_cert
    m2.ssl_ctx_use_cert(self.ctx, certfile)
SSLError: No such file or directory
2011-10-18 11:14:08,097 [INFO]  @connection.py:362 - Connection Established: host: jsefler-onprem-62candlepin.usersys.redhat.com, port: 8443, handler: /candlepin
2011-10-18 11:14:08,097 [ERROR]  @managercli.py:65 - exception caught in subscription-manager
2011-10-18 11:14:08,097 [ERROR]  @managercli.py:66 - No section: 'non-existing-section'
Traceback (most recent call last):
  File "/usr/sbin/subscription-manager", line 78, in <module>
    sys.exit(abs(main() or 0))
  File "/usr/sbin/subscription-manager", line 69, in main
    return managercli.CLI().main()
  File "/usr/share/rhsm/subscription_manager/managercli.py", line 1370, in main
    cmd.main()
  File "/usr/share/rhsm/subscription_manager/managercli.py", line 233, in main
    self._do_command()
  File "/usr/share/rhsm/subscription_manager/managercli.py", line 1126, in _do_command
    self._validate_options()
  File "/usr/share/rhsm/subscription_manager/managercli.py", line 1118, in _validate_options
    for key, value in cfg.items(section):
  File "/usr/lib/python2.6/site-packages/iniparse/compat.py", line 267, in items
    raise NoSectionError(section)
NoSectionError: No section: 'non-existing-section'



Version-Release number of selected component (if applicable):
[root@jsefler-onprem-62server ~]# rpm -q subscription-manager
subscription-manager-0.96.15-1.git.7.fbf42c7.el6.x86_64


How reproducible:


Steps to Reproduce:
1. above
2.
3.
  
Actual results:


Expected results:


Additional info:
This test discovery comes from an automated test that has been passing for some time.

Comment 1 Bryan Kearney 2011-10-18 15:50:22 UTC

*** This bug has been marked as a duplicate of bug 746264 ***

Comment 3 John Sefler 2011-10-30 03:21:16 UTC
The following branch commits by alikins fix this bug...

RHEL6.2 branch commit ed5f1172f33db33e97cbc5a6d3fe10ee97039557 by Adrian Likins
master branch commit bc4d620ae1a475a15cd89dcbc20742e2d45a9d79 by Adrian Likins

747024: restore previous behaviour for unhandled exceptions

As part of the change to handle unicode strings in error
messages, handle exception was changed to just pass
in handle_exceptions passed in msg. This changed behaviour
for some error cases, so return that, but ignore msgs
passed to systemExit that do not have string reprs.

Comment 4 John Sefler 2011-10-30 03:42:46 UTC
Verifying Version...
[root@jsefler-onprem-62server ~]# rpm -q subscription-manager
subscription-manager-0.96.17-1.el6.x86_64

[root@jsefler-onprem-62server ~]# subscription-manager config --remove=non-existing-section.parameter
No section: 'non-existing-section'
[root@jsefler-onprem-62server ~]# 


^^^ The original behavior has been restored after committed fix in comment 3

moving to VERIFIED

Comment 6 errata-xmlrpc 2011-12-06 17:26:02 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.

http://rhn.redhat.com/errata/RHBA-2011-1695.html


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