os-autoinst-distri-fedora/lib
Adam Williamson 33ac181955 Use mirrorlist instead of baseurl for updates tests
The reason we have all this horrible code to use the commented-
out baseurl lines in the repo files instead of the metalinks
that are usually used is a timing issue with the metalink
system. As a protection against stale mirrors, the metalink
system sends the package manager a list of mirrors *and a list
of recent checksums for the repo metadata*. The package manager
goes out and gets the metadata from the first mirror on the
list, then checksums it; if the checksum isn't on the list of
checksums it got from mirrormanager, it assumes that means the
mirror is stale, and tries the next on the list instead.

The problem is that MM's list of checksums is currently only
updated once an hour (by a cron job). So we kept running into
a problem where, when a test ran just after one of the repos
had been regenerated, the infra mirror it's supposed to use
would be rejected because the checksum wasn't on the list - but
not because the mirror was stale, but because it was too fresh,
it had got the new packages and metadata but mirrormanager's
list of checksums hadn't been updated to include the checksum
for the latest metadata.

All this baseurl munging code was getting ridiculous, though,
what with the tests getting more complicated and errors showing
up in the actual repo files and stuff. It occurred to me that
instead of using the baseurl we can just use the 'mirrorlist'
system instead of 'metalink'. mirrorlist is the dumber, older
system which just provides the package manager a list of mirrors
and nothing else - the whole stale-mirror-detection-checksum
thing does not happen with mirrorlists, the package manager just
tries all the mirrors in order and uses the first that works.
And happily, it's very easy to convert the metalink URLs into
mirrorlist URLs, and it saves all that faffing around trying to
fix up baseurls.

Also, adjust upgrade_boot to do the s/metalink/mirrorlist/
substitution, so upgrade tests don't run into the timing issue
in the steps before the main repo_setup run is done by
upgrade_run, and adjust repo_setup_compose to sub this line out
later.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2018-05-18 16:41:13 -07:00
..
anaconda.pm Use Server not Everything variant for http repos on modular 2017-11-06 16:25:40 -08:00
anacondatest.pm Finally revert anaconda root_console workaround 2017-07-04 09:48:40 -07:00
fedoradistribution.pm drop our implementation of script_run in favour of os-autoinst 2016-10-20 09:24:48 -07:00
freeipa.pm FreeIPA: handle unexpected auto-login to webUI 2018-03-21 15:43:40 -07:00
installedtest.pm Use better pattern for checking if there are coredumps 2018-04-04 14:13:39 -07:00
packagetest.pm Handle KDE update test when KDE has aleady found updates 2018-03-28 19:53:19 -07:00
tapnet.pm Add support for testing updates 2017-02-22 11:33:32 -08:00
utils.pm Use mirrorlist instead of baseurl for updates tests 2018-05-18 16:41:13 -07:00