From e59247dffde897739eaff327eae5302f78aea6d4 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Sat, 3 Dec 2022 12:36:52 -0800 Subject: [PATCH] ostree: use scratch disk as target for rpm-ostree compose Seems like we might be running out of space on this step on F35. Signed-off-by: Adam Williamson --- ostree-parse-pungi.py | 2 +- tests/_ostree_build.pm | 19 ++++++++++--------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/ostree-parse-pungi.py b/ostree-parse-pungi.py index 5ff45633..769897e2 100644 --- a/ostree-parse-pungi.py +++ b/ostree-parse-pungi.py @@ -43,6 +43,6 @@ for addtempvar in args["add_template_var"]: # this is where the previous step of the openQA test created the # ostree repo -cmd = cmd.replace("https://kojipkgs.fedoraproject.org/compose/ostree/repo/", "file:///ostree/repo") +cmd = cmd.replace("https://kojipkgs.fedoraproject.org/compose/ostree/repo/", "file:///var/tmp/ostree/repo") print(cmd) diff --git a/tests/_ostree_build.pm b/tests/_ostree_build.pm index c6ab91bb..ba688fc0 100644 --- a/tests/_ostree_build.pm +++ b/tests/_ostree_build.pm @@ -23,6 +23,12 @@ sub run { my $arch = get_var("ARCH"); my $subv = get_var("SUBVARIANT"); my $lcsubv = lc($subv); + # mount our nice big empty scratch disk as /var/tmp + assert_script_run "rm -rf /var/tmp/*"; + assert_script_run "echo 'type=83' | sfdisk /dev/vdc"; + assert_script_run "mkfs.ext4 /dev/vdc1"; + assert_script_run "echo '/dev/vdc1 /var/tmp ext4 defaults 1 2' >> /etc/fstab"; + assert_script_run "mount /var/tmp"; assert_script_run "cd /"; # usually a good idea for this kinda thing assert_script_run "setenforce Permissive"; @@ -41,8 +47,8 @@ sub run { upload_logs "fedora-$lcsubv.yaml"; assert_script_run 'popd'; # now make the ostree repo - assert_script_run "mkdir -p /ostree"; - assert_script_run "ostree --repo=/ostree/repo init --mode=archive"; + assert_script_run "mkdir -p /var/tmp/ostree"; + assert_script_run "ostree --repo=/var/tmp/ostree/repo init --mode=archive"; # PULL SOME LEVERS! PULL SOME LEVERS! # This shadows pungi/ostree/tree.py # FIXME: when https://fedoraproject.org/wiki/Changes/FedoraSilverblueUnifiedCore @@ -51,7 +57,7 @@ sub run { # disables updating the ref with the new commit, and we *do* want # to do that. pungi updates the ref itself, I don't want to copy # all that work in here - assert_script_run "rpm-ostree compose tree --repo=/ostree/repo/ --add-metadata-string=version=${advortask} --force-nocache /workstation-ostree-config/fedora-$lcsubv.yaml > /tmp/ostree.log 2>&1", 4500; + assert_script_run "rpm-ostree compose tree --repo=/var/tmp/ostree/repo/ --add-metadata-string=version=${advortask} --force-nocache /workstation-ostree-config/fedora-$lcsubv.yaml > /tmp/ostree.log 2>&1", 4500; upload_logs "/tmp/ostree.log"; # check out the ostree installer lorax templates assert_script_run 'cd /'; @@ -62,18 +68,13 @@ sub run { assert_script_run 'cd pungi-fedora/'; assert_script_run "git checkout ${branch}"; # change 'ostree' to 'main' on/after merge - assert_script_run 'wget https://pagure.io/fedora-qa/os-autoinst-distri-fedora/raw/main/f/ostree-parse-pungi.py', timeout => 120; + assert_script_run 'wget https://pagure.io/fedora-qa/os-autoinst-distri-fedora/raw/ostree/f/ostree-parse-pungi.py', timeout => 120; my $loraxargs = script_output "python3 ostree-parse-pungi.py $lcsubv $arch"; # this 'temporary file cleanup' thing can actually wipe bits of # the lorax install root while lorax is still running... assert_script_run "systemctl stop systemd-tmpfiles-clean.timer"; # create the installer ISO - assert_script_run "rm -rf /var/tmp/*"; - assert_script_run "echo 'type=83' | sfdisk /dev/vdc"; - assert_script_run "mkfs.ext4 /dev/vdc1"; - assert_script_run "echo '/dev/vdc1 /var/tmp ext4 defaults 1 2' >> /etc/fstab"; - assert_script_run "mount /var/tmp"; assert_script_run "mkdir -p /var/tmp/imgbuild"; assert_script_run "cd /var/tmp/imgbuild";