Bug 712896 - yum regression: in method 'ssl_ctx_load_verify_locations', argument 2 of type 'char const *'
yum regression: in method 'ssl_ctx_load_verify_locations', argument 2 of type...
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: yum (Show other bugs)
All Linux
high Severity high
: rc
: 5.7
Assigned To: James Antill
Karel Srot
: Regression
Depends On:
  Show dependency treegraph
Reported: 2011-06-13 10:10 EDT by Jan Pazdziora
Modified: 2014-01-21 01:23 EST (History)
4 users (show)

See Also:
Fixed In Version: yum-3.2.22-37.el5
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2011-07-21 07:24:11 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Jan Pazdziora 2011-06-13 10:10:15 EDT
Description of problem:

Recently our tests started to fail on RHEL 5.7 (to be). I've narrowed it down to change between yum-3.2.22-33.el5.noarch and yum-3.2.22-34.el5.noarch. We now get traceback

Traceback (most recent call last):
  File "/usr/sbin/rhn_check", line 333, in __run_action
    (status, message, data) = CheckCli.__do_call(method, params, kwargs)
  File "/usr/sbin/rhn_check", line 325, in __do_call
    method = getMethod.getMethod(method, "/usr/share/rhn/", "actions")
  File "/usr/share/rhn/up2date_client/getMethod.py", line 78, in getMethod
    actions = __import__(modulename)
  File "/usr/share/rhn/actions/packages.py", line 268, in ?
    yum_base = YumAction()
  File "/usr/share/rhn/actions/packages.py", line 63, in __init__
  File "/usr/lib/python2.4/site-packages/yum/depsolve.py", line 86, in doTsSetup
    return self._getTs()
  File "/usr/lib/python2.4/site-packages/yum/depsolve.py", line 101, in _getTs
  File "/usr/lib/python2.4/site-packages/yum/depsolve.py", line 112, in _getTsInfo
    pkgSack = self.pkgSack
  File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 662, in <lambda>
    pkgSack = property(fget=lambda self: self._getSacks(),
  File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 502, in _getSacks
  File "/usr/lib/python2.4/site-packages/yum/repos.py", line 260, in populateSack
    sack.populate(repo, mdtype, callback, cacheonly)
  File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 168, in populate
    if self._check_db_version(repo, mydbtype):
  File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 226, in _check_db_version
    return repo._check_db_version(mdtype)
  File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 1225, in _check_db_version
    repoXML = self.repoXML
  File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 1398, in <lambda>
    repoXML = property(fget=lambda self: self._getRepoXML(),
  File "/usr/share/yum-plugins/rhnplugin.py", line 513, in _getRepoXML
    return YumRepository._getRepoXML(self)
  File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 1390, in _getRepoXML
  File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 1380, in _loadRepoXML
    return self._groupLoadRepoXML(text, ["primary"])
  File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 1364, in _groupLoadRepoXML
    if self._commonLoadRepoXML(text):
  File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 1200, in _commonLoadRepoXML
    result = self._getFileRepoXML(local, text)
  File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 973, in _getFileRepoXML
    cache=self.http_caching == 'all')
  File "/usr/share/yum-plugins/rhnplugin.py", line 327, in _getFile
    start, end, copy_local, checkfunc, text, reget, cache, size)
  File "/usr/share/yum-plugins/rhnplugin.py", line 420, in _noExceptionWrappingGet
    result = self.grab.urlgrab(remote, local,
  File "/usr/share/yum-plugins/rhnplugin.py", line 482, in <lambda>
    grab = property(lambda self: self._getgrab())
  File "/usr/share/yum-plugins/rhnplugin.py", line 477, in _getgrab
  File "/usr/share/yum-plugins/rhnplugin.py", line 444, in _setupGrab
    ugopts = self._default_grabopts()
  File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 486, in _default_grabopts
    opts = { 'keepalive': self.keepalive,
  File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 653, in _getSslContext
  File "/usr/lib/python2.4/site-packages/M2Crypto/SSL/Context.py", line 130, in load_verify_locations
    return m2.ssl_ctx_load_verify_locations(self.ctx, cafile, capath)
exceptions.TypeError: in method 'ssl_ctx_load_verify_locations', argument 2 of type 'char const *'

with yum-rhn-plugin from Spacewalk upstream.

A quick Google search shows


where the cause is claimed to be a unicode object instead of string.

Version-Release number of selected component (if applicable):


How reproducible:

Hard, as part of larger test.

Steps to Reproduce:
1. yum repolist
Actual results:

Fail with the traceback above.

Expected results:

Should not fail.

Additional info:

James says:

At certain points near the beginning of operations we call

 With 3.2.22-36.el5 this is called with self.sslcacert set to the
unicode string:  /etc/sysconfig/rhn/RHN-ORG-TRUSTED-SSL-CERT

 With 3.2.22-33.el5 this function isn't called at all (because of the
way rhnplugin overrides the yum "grab setup").
Comment 3 Jan Pazdziora 2011-06-16 05:11:50 EDT
Awesome, I confirm that yum-3.2.22-37.el5 fixes the problem for us.

Thank you!

Comment 5 errata-xmlrpc 2011-07-21 07:24:11 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.


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