From 7027f7914e32bcf0942931f8915fe602e27dd7aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Cami?= Date: Sun, 30 Jun 2019 23:39:38 +0200 Subject: [PATCH] Make dnf more robust and faster MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sometimes the prepare-build step of azure pipelines fails with download errors: "configure: error: Package requirements (nspr) were not met:" This can be due to fastestmirror not being used to check mirror availability and sometimes speed. Combined with a too-low default number of retries, and a high timeout this can lead to download failures that could be avoided. Activate fastestmirror, add more download workers, and tune timeout/retries to make dnf more reliable. Fixes: https://pagure.io/freeipa/issue/7999 Signed-off-by: François Cami Reviewed-By: Christian Heimes --- ipatests/azure/templates/prepare-build.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ipatests/azure/templates/prepare-build.yml b/ipatests/azure/templates/prepare-build.yml index 6fcaa23a1..479d3bebb 100644 --- a/ipatests/azure/templates/prepare-build.yml +++ b/ipatests/azure/templates/prepare-build.yml @@ -2,6 +2,13 @@ steps: - script: | set -e sudo rm -rf /var/cache/dnf/* + echo "dnf.conf: enable fastestmirror, use 8 download workers, lower timeout to fail faster, and add more retries" + sudo tee -a /etc/dnf/dnf.conf < /dev/null + fastestmirror = True + max_parallel_downloads = 8 + timeout = 8 + retries = 20 + EOF echo 'Disable modular repositories' sudo dnf config-manager '*modular*' --set-disabled sudo dnf makecache || :