Skip to content

Commit

Permalink
mockbuild: add a swapfile to el8 aarch64 builds
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
achilleas-k committed Oct 18, 2023
1 parent f4afef2 commit 5a337cd
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions schutzbot/mockbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit 5a337cd

Please sign in to comment.