Yum fails with "AttributeError: 'RhnRepo' object has no attribute '_retry_no_cache'" on system registered with Red Hat Satellite 5.x.
Issue
- All
yumcommands fails with below error on Red Hat Enterprise Linux 7 registered with Satellite-5x:
# yum repolist
Loaded plugins: rhnplugin, search-disabled-repos
This system is receiving updates from RHN Classic or Red Hat Satellite.
Traceback (most recent call last):
File "/usr/bin/yum", line 29, in <module>
yummain.user_main(sys.argv[1:], exit_code=True)
File "/usr/share/yum-cli/yummain.py", line 365, in user_main
errcode = main(args)
File "/usr/share/yum-cli/yummain.py", line 174, in main
result, resultmsgs = base.doCommands()
File "/usr/share/yum-cli/cli.py", line 573, in doCommands
return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd, self.extcmds)
File "/usr/share/yum-cli/yumcommands.py", line 2149, in doCommand
base.repos.populateSack()
File "/usr/lib/python2.7/site-packages/yum/repos.py", line 383, in populateSack
sack.populate(repo, mdtype, callback, cacheonly)
File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 224, in populate
if self._check_db_version(repo, mydbtype):
File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 316, in _check_db_version
return repo._check_db_version(mdtype)
File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1484, in _check_db_version
repoXML = self.repoXML
File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1670, in <lambda>
repoXML = property(fget=lambda self: self._getRepoXML(),
File "/usr/share/yum-plugins/rhnplugin.py", line 564, in _getRepoXML
return YumRepository._getRepoXML(self)
File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1666, in _getRepoXML
self._loadRepoXML(text=self.ui_id)
File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1657, in _loadRepoXML
return self._groupLoadRepoXML(text, self._mdpolicy2mdtypes())
File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1631, in _groupLoadRepoXML
if self._commonLoadRepoXML(text):
File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1456, in _commonLoadRepoXML
result = self._getFileRepoXML(local, text)
File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1234, in _getFileRepoXML
size=102400) # setting max size as 100K
File "/usr/share/yum-plugins/rhnplugin.py", line 376, in _getFile
start, end, copy_local, checkfunc, text, reget, cache, size)
File "/usr/share/yum-plugins/rhnplugin.py", line 480, in _noExceptionWrappingGet
retry_no_cache=self._retry_no_cache
AttributeError: 'RhnRepo' object has no attribute '_retry_no_cache'
Environment
- Red Hat Satellite 5.x
- Red Hat Enterprise Linux 7
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
