1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2024-11-25 07:13:09 +00:00

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 <awilliam@redhat.com>
This commit is contained in:
Adam Williamson 2022-12-03 12:36:52 -08:00
parent c2fb8fa83b
commit e59247dffd
2 changed files with 11 additions and 10 deletions

View File

@ -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)

View File

@ -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";