Repository navigation
Let CI give up on a dnf mirror that is slow or hangs - #22
Merged
Merged
Conversation
tools/dnf.sh runs dnf in a CI container: the repository data first (dnf makecache, without -q), then the command, each with 180 seconds per try and up to three tries, 15 seconds apart. It sets minrate=100000 and timeout=20 in /etc/dnf/dnf.conf, so dnf leaves a mirror slower than 100 kB/s. On AlmaLinux the first dnf install of a job once took almost 14 minutes and once ran until the job's 20-minute limit. The repository end-to-end step installs azentrius-repository through it on Fedora, Rocky Linux and AlmaLinux.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The first
dnf installin an AlmaLinux container is sometimes very slow, and under-qit prints nothing until it is done. In theupgradejob of Image Update Monitor:upgrade (almalinux:9)spent 815 seconds in that one call (almost 14 minutes).upgrade (almalinux:9)sat silent in it until the job's 20-minute limit cancelled it. The rerun took 649 seconds there, andupgrade (almalinux:10)in the same run 391.The same steps normally take 11 to 80 seconds, and Rocky Linux stayed under a minute in the same runs. The logs don't show which part was slow, the repository data or the packages.
tools/dnf.shruns dnf as root in a CI container:minrate=100000andtimeout=20under[main]in/etc/dnf/dnf.conf, so dnf leaves a mirror that sends less than 100 kB/s for 20 seconds and takes the next one. dnf's defaults are 1 kB/s and 30 seconds. The settings stay in place for every later dnf in that container.dnf makecachefirst, without-q, so the log shows each repository's size and speed. Then it runs the command.sh /dnf.sh makecachefetches only the repository data, for a dnf call that has to stay as it is (a refused install, whose failure is the expected result).It is the same file in all seven repositories that run dnf in CI containers (blob
ad912ed, executable): Cron Jobs, Image Update Monitor, Status Board, Host Settings, Update Gaps, Security Monitor and packages.Now in
.github/workflows/test.yml:azentrius-repositorythrough/dnf.shon Fedora 43, Rocky Linux 9 and 10 and AlmaLinux 9 and 10.tools/apt-update.sh.Unchanged:
dnf remove, which works from the repository data that is already there.Checks:
dnfunder dash: the settings land right after[main], and only once; makecache runs before the command; two failed tries and then a working one give exit 0; three failed tries give exit 1 and the error; a hung try ends after the limit with exit 124; without[main]the script stops before any dnf; without arguments it exits 64.bash -nanddash -n.