Hide Forgot
Description of problem: A customer is using fastestmirror plugin to detect the fastest mirror in the list. In RHEL6, the detection was done before retrieving the metadata or all repositories, so it just could retrieve the metadata from the fastest one only. In RHEL7, the metadata is retrieved before the detection, so it tries to retrieve the metadata from a slower mirror. When some mirrors in the list are not available, it makes a delay until finding the usable mirror. This looks related with [1]. The change was not in RHEL6, but it's in RHEL7. The customer tested the following change in /usr/lib/python2.7/site-packages/yum/repos.py. This is just for testing. -------------------------------------- def doSetup(self, thisrepo = None): ... self._setup = True self.retrieveAllMD() self.ayum.plugins.run('postreposetup') -------------------------------------- ====> -------------------------------------- def doSetup(self, thisrepo = None): ... self._setup = True self.ayum.plugins.run('postreposetup') self.retrieveAllMD() -------------------------------------- And, they confirmed that the problem was fixed. The comment in [1] says that "Metadata are downloaded in parallel just before postreposetup." So, it seems that inserting self.retrieveAllMD() just before self.ayum.plugins.run('postreposetup') was by design. I'm not sure the reason, but any plugin requires that? Can we fix this problem in yum side? [1] http://yum.baseurl.org/gitweb?p=yum.git;a=commitdiff;h=a522869c21768d53c3861be9c0a2394a3930ad66 Version-Release number of selected component (if applicable): Red Hat Enterprise Linux 7 How reproducible: Always Steps to Reproduce: 1. configure yum repositiry mirrors (some mirrors are not reachable) 2. configure fastestmirror plugin 3. run 'yum clean all' and 'yum repolist' Actual results: It tries to retrieve metadata from slower mirror. # yum repolist Loaded plugins: fastestmirror, langpacks http://test1.example.com/x86_64/repodata/repomd.xml: [Errno 12] Timeout on http://test1.example.com/x86_64/repodata/repomd.xml: (28, 'Connection timed out after 30002 milliseconds') Trying other mirror. ... Expected results: It can retrieve the metadata from the fastest mirror soon as done in RHEL6. Additional info: Looks a regression from RHEL6.
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. https://access.redhat.com/errata/RHBA-2018:0919