From d885cd6dc273dea50b371851fd16110b4908fd49 Mon Sep 17 00:00:00 2001 From: Paul Holzinger Date: Tue, 30 Apr 2024 18:02:33 +0200 Subject: [PATCH] fedora: increase /tmp tmpfs size By default we only get 50% of all memory, given our programs don't take this much we should instead use more /tmp space in case we have to store more images. Signed-off-by: Paul Holzinger --- cache_images/fedora_setup.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cache_images/fedora_setup.sh b/cache_images/fedora_setup.sh index cf50206a..90964de9 100644 --- a/cache_images/fedora_setup.sh +++ b/cache_images/fedora_setup.sh @@ -17,6 +17,12 @@ fi # shellcheck source=./lib.sh source "$REPO_DIRPATH/lib.sh" +# Make /tmp tmpfs bigger, by default we only get 50%. Bump it to 75% so the tests have more storage. +# Do not use 100% so we do not run out of memory for the process itself if tests start leaking big +# files on /tmp. +$SUDO mkdir /etc/systemd/system/tmp.mount.d +$SUDO sh -c 'echo -e "[Mount]\nOptions=size=75%%,mode=1777\n" > /etc/systemd/system/tmp.mount.d/override.conf' + # packer and/or a --build-arg define this envar value uniformly # for both VM and container image build workflows. req_env_vars PACKER_BUILD_NAME