Commit Graph

3 Commits

Author SHA1 Message Date
Scott Little cf435e6c2a download_mirror.sh fails with 404 errors
The 'yum makecache' step is failing. The issue is seen when the fast
mirror plugin for yum is in use (default).

The metadata for a yum repo as scattered across several files. The
master file is repomd.xml, and it may list several supporting files,
e.g.
   filelists.xml.gz
   primary.xml.gz
   filelists.sqlite.bz2
   other.sqlite.bz2
   other.xml.gz
   primary.sqlite.bz2

When fast mirror plugin is in use, each file might download from a
separate source. This opens the door for a race condition when a repo
update is rolling out across the mirrors.

The error suggests we have already downloaded a repomd.xml, but it is
obsolete and references a supporting file that no longer exists.

A second possible source of inconsistent data is caching proxies.

Solution:
1) Disabling the yum fast cache plugin is undesirable, and there
is no option forcing metadata iof a given repo to be single sourced.
So this update adds a limited number of retries for the
'yum makecache' command.

So far we've never seen 'yum makecache' fail twice in a row... 
largely because the 'fastest mirror' plugin rarely downloaded from the
same source twice.

2) Add 'http_caching=packages' to yum.conf, which asks upstream proxies
to not cache repodata.

Change-Id: I3fa3f61e38d868fb14f4175b87c0d323abb57def
Closes-bug: 1818911
Signed-off-by: Scott Little <scott.little@windriver.com>
2019-03-13 14:32:03 +00:00
zhangkunpeng 0a850d36df repair typo
repair typo in centos-mirror-tools/yum.conf.sample

Change-Id: I9af9b35d3e0a6e3b9342e35479995b64b1a145d0
Story: 2004088
Task: 28138
Signed-off-by: zhangkunpeng <zhang.kunpeng@99cloud.net>
2018-11-29 11:33:01 +08:00
Saul Wold 287e535453 yum.conf.sample: Add example yum.conf
This uses the local yum.repos.d and sets the releasever=7 needed
for running on a non-yum based machine.

Story: 2003764
Task: 26454

Change-Id: Id616eef24d66fd43d4ab0d7356c1eafba3c84af2
Signed-off-by: Saul Wold <sgw@linux.intel.com>
2018-09-13 13:56:39 -07:00