Skip to content

Commit 02aa49c

Browse files
author
Adrian Reber
committed
ci: speed up zypper and disable metalink in CI
Configure zypper to use 10 concurrent download connections and disable metalink. Metalink causes zypper to issue partial/range downloads which prevents the squid proxy from caching complete objects. The settings are applied to both the host and the compute node chroot via the recipe file. Generated with Claude Code (https://claude.ai/code) Signed-off-by: Adrian Reber <areber@redhat.com>
1 parent 4a1959e commit 02aa49c

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

ansible/roles/test/files/support_functions.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,16 @@ install_openHPC_cluster() {
429429
sed 's|#<<< ohpc_proxy:compute >>>#|echo "max_parallel_downloads=10" >> $CHROOT/etc/dnf/dnf.conf\necho "debuglevel=1" >> $CHROOT/etc/dnf/dnf.conf|' -i "${recipeFile}"
430430
fi
431431

432+
if [ "${PKG_MANAGER}" == "zypper" ]; then
433+
# Metalink causes zypper to use partial/range downloads which
434+
# breaks caching in the squid proxy.
435+
echo "CI Customization: Speed up zypper and disable metalink"
436+
echo "download.max_concurrent_connections = 10" >>/etc/zypp/zypp.conf
437+
echo "download.use_metalink = false" >>/etc/zypp/zypp.conf
438+
# shellcheck disable=SC2016
439+
sed 's|#<<< ohpc_proxy:compute >>>#|echo "download.max_concurrent_connections = 10" >> $CHROOT/etc/zypp/zypp.conf\necho "download.use_metalink = false" >> $CHROOT/etc/zypp/zypp.conf|' -i "${recipeFile}"
440+
fi
441+
432442
if [ "${EnableArmCompiler}" == "true" ]; then
433443
# enable local ARM1 repository
434444
sed -e "s,install arm1-compilers-devel-ohpc,install --enablerepo=ARM1 arm1-compilers-devel-ohpc,g" -i "${recipeFile}"

0 commit comments

Comments
 (0)