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.
Description of problem:
When some yum plugin (in this case yum-rhn-plugin) raises an exception which inherits from YumBaseError, yum doesn't handle this exception properly (given parametr ~ error message ~ is omitted).
I hit this problem when I added `raise SSL.SysCallError('error message')` to /usr/lib/python2.6/site-packages/rhn/SSL.py (line 217). Then I ran `yum repolist` and check the output.
Version-Release number of selected component (if applicable):
yum-rhn-plugin-0.9.1-39.el6
rhn-client-tools-1.0.0-79.el6
How reproducible:
Steps to Reproduce:
1.
2.
3.
Actual results:
# yum repolist
Loaded plugins: product-id, refresh-packagekit, rhnplugin, security, subscription-manager
Updating certificate-based repositories.
Network error:
Expected results:
# yum repolist
Loaded plugins: product-id, refresh-packagekit, rhnplugin, security, subscription-manager
Updating certificate-based repositories.
Network error: error message
Additional info:
This might be related to bug 751294 (on RHEL5).
Hit this issue while testing bug 751292 (on RHEL6).
unless I'm missing something SSL.SysCallError() is actually OpenSSL.SSL.SysCallError() ... which isn't a YumBaseError().
According to http://pyopenssl.sourceforge.net/pyOpenSSL.txt it's defined as:
exception SysCallError
The SysCallError occurs when there's an I/O error and OpenSSL's
error queue does not contain any information. This can mean two
things: An error in the transport protocol, or an end of file
that violates the protocol. The parameter to the exception is
always a pair (errnum, errstr).
...which probably means it inherits from IOError ... so uses this path in yum:
def exIOError(e):
if e.errno == 32:
logger.critical(_('\n\nExiting on Broken Pipe'))
else:
logger.critical(_('\n\n%s') % exception2msg(e))
if unlock(): return 200
return 1
...which does:
def exception2msg(e):
""" DIE python DIE! Which one works:
to_unicode(e.value); unicode(e); str(e);
Call this so you don't have to care. """
try:
return to_unicode(e.value)
except:
pass
try:
return unicode(e)
except:
pass
try:
return str(e)
except:
pass
return "<exception failed to convert to text>"
Description of problem: When some yum plugin (in this case yum-rhn-plugin) raises an exception which inherits from YumBaseError, yum doesn't handle this exception properly (given parametr ~ error message ~ is omitted). I hit this problem when I added `raise SSL.SysCallError('error message')` to /usr/lib/python2.6/site-packages/rhn/SSL.py (line 217). Then I ran `yum repolist` and check the output. Version-Release number of selected component (if applicable): yum-rhn-plugin-0.9.1-39.el6 rhn-client-tools-1.0.0-79.el6 How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: # yum repolist Loaded plugins: product-id, refresh-packagekit, rhnplugin, security, subscription-manager Updating certificate-based repositories. Network error: Expected results: # yum repolist Loaded plugins: product-id, refresh-packagekit, rhnplugin, security, subscription-manager Updating certificate-based repositories. Network error: error message Additional info: This might be related to bug 751294 (on RHEL5). Hit this issue while testing bug 751292 (on RHEL6).