Bug 1389447 - AttributeError: 'YumRepository' object has no attribute '_metadata_cache_req'
Summary: AttributeError: 'YumRepository' object has no attribute '_metadata_cache_req'
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: yum
Version: 7.3
Hardware: All
OS: Linux
unspecified
low
Target Milestone: rc
: ---
Assignee: Valentina Mukhamedzhanova
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-10-27 15:21 UTC by Orion Poplawski
Modified: 2018-09-24 12:34 UTC (History)
3 users (show)

Fixed In Version: yum-3.4.3-150.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-09-24 12:34:30 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Orion Poplawski 2016-10-27 15:21:38 UTC
Description of problem:

I'm seeing this with /etc/cron.hourly/0yum-hourly.cron:

Traceback (most recent call last):
  File "/usr/sbin/yum-cron", line 729, in <module>
    main()
  File "/usr/sbin/yum-cron", line 726, in main
    base.updatesCheck()
  File "/usr/sbin/yum-cron", line 618, in updatesCheck
    self.populateUpdateMetadata()
  File "/usr/sbin/yum-cron", line 422, in populateUpdateMetadata
    self.pkgSack # honor skip_if_unavailable
  File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 1071, in <lambda>
    pkgSack = property(fget=lambda self: self._getSacks(),
  File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 775, in _getSacks
    self.repos.populateSack(which=repos)
  File "/usr/lib/python2.7/site-packages/yum/repos.py", line 344, in populateSack
    self.doSetup()
  File "/usr/lib/python2.7/site-packages/yum/repos.py", line 157, in doSetup
    self.retrieveAllMD()
  File "/usr/lib/python2.7/site-packages/yum/repos.py", line 88, in retrieveAllMD
    dl = repo._async and repo._commonLoadRepoXML(repo)
  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1469, in _commonLoadRepoXML
    if self.skip_if_unavailable and self._metadata_cache_req in ('write', 'read-only:future'):
AttributeError: 'YumRepository' object has no attribute '_metadata_cache_req'

This appears to be triggered by an issue with my local mirror:

# yum makecache
Loaded plugins: product-id, search-disabled-repos, subscription-manager
CoRA                                                                                                                                                 | 3.6 kB  00:00:00     
epel                                                                                                                                                 | 8.6 kB  00:00:00     
http://epel.cora.nwra.com/7/x86_64/repodata/repomd.xml: [Errno -1] Error importing repomd.xml for epel: Damaged repomd.xml file

but a better error message would be nice.

Version-Release number of selected component (if applicable):
yum-cron-3.4.3-148.el7.noarch

Comment 2 Valentina Mukhamedzhanova 2016-11-02 11:03:12 UTC
I believed this is fixed in yum-3.4.3-150.el7.

Comment 3 Orion Poplawski 2016-11-04 03:54:24 UTC
Looks like it.  I can't reproduce it with that version.


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