From f183932d7bcf7a73b2f0e745e374783dd0017d4c Mon Sep 17 00:00:00 2001 From: Achilleas Koutsou Date: Mon, 2 Oct 2023 17:07:39 +0200 Subject: [PATCH] mockbuild: add a swapfile to el8 aarch64 builds The pulp client is very large and defines a lot of symbols in on package, which causes very large memory usage on el8 aarch64 (presumably because of 64k page sizes). Adding a 1 GiB swapfile fixes the issue in our CI runners. --- schutzbot/mockbuild.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/schutzbot/mockbuild.sh b/schutzbot/mockbuild.sh index f17bec8ab0d..def7e5e436d 100755 --- a/schutzbot/mockbuild.sh +++ b/schutzbot/mockbuild.sh @@ -72,6 +72,14 @@ if [[ "$ID" == rhel ]] && sudo subscription-manager status; then DISTRO_VERSION=rhel-${VERSION_ID%.*}-cdn fi +# EL8 aarch64 builds run out of memory and get killed. A swapfile fixes this. +if [[ "$PLATFORM_ID" == "platform:el8" ]] && [[ "${ARCH}" == "aarch64" ]]; then + sudo dd if=/dev/zero of=/swapfile bs=1M count=1024 + sudo chmod 600 /swapfile + sudo mkswap /swapfile + sudo swapon /swapfile +fi + # Relative path of the repository – used for constructing both the local and # remote paths below, so that they're consistent. REPO_PATH=osbuild-composer/${DISTRO_VERSION}/${ARCH}/${COMMIT}