From 19a5285d5091dba5d4bd9c13341ac35c0de69353 Mon Sep 17 00:00:00 2001 From: Chris Evich Date: Mon, 25 Oct 2021 11:31:12 -0400 Subject: [PATCH] Cirrus: Bump Fedora to release 35 The Fedora 35 cloud images have switched to UEFI boot with a GPT partition. Formerly, all Fedora images included support for runtime re-partitioning. However, the requirement to test alternate storage has since been dropped/removed. Rather than maintain a disused feature, and supporting scripts, these Fedora VM images have reverted to the default: Automatically resize to 100% on boot. Signed-off-by: Chris Evich --- .cirrus.yml | 5 +- contrib/cirrus/add_second_partition.sh | 63 -------------------------- contrib/cirrus/setup.sh | 6 --- 3 files changed, 1 insertion(+), 73 deletions(-) delete mode 100644 contrib/cirrus/add_second_partition.sh diff --git a/.cirrus.yml b/.cirrus.yml index 00cebcca282..29c07db329b 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -29,7 +29,7 @@ env: PRIOR_FEDORA_NAME: "fedora-33" UBUNTU_NAME: "ubuntu-2104" - IMAGE_SUFFIX: "c6431352024203264" + IMAGE_SUFFIX: "c5160336597712896" FEDORA_CACHE_IMAGE_NAME: "fedora-${IMAGE_SUFFIX}" PRIOR_FEDORA_CACHE_IMAGE_NAME: "prior-fedora-${IMAGE_SUFFIX}" UBUNTU_CACHE_IMAGE_NAME: "ubuntu-${IMAGE_SUFFIX}" @@ -216,9 +216,6 @@ static_build_task: init_script: | set -ex setenforce 0 - growpart /dev/sda 1 || true - resize2fs /dev/sda1 || true - yum -y install podman nix_cache: folder: '.cache' diff --git a/contrib/cirrus/add_second_partition.sh b/contrib/cirrus/add_second_partition.sh deleted file mode 100644 index f49ad61ae30..00000000000 --- a/contrib/cirrus/add_second_partition.sh +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/bash - -# N/B: This script could mega f*!@up your disks if run by mistake. -# it is left without the execute-bit on purpose! - -# $SLASH_DEVICE is the disk device to be f*xtuP -SLASH_DEVICE="/dev/sda" # Always the case on GCP VM Images - -# The unallocated space results from the difference in disk-size between VM Image -# and runtime request. The check_image.sh test includes a minimum-space check, -# with the Image size set initially lower by contrib/cirrus/packer/libpod_images.yml -NEW_PART_START="50%" -NEW_PART_END="100%" - -set -eo pipefail - -source $(dirname $0)/lib.sh - -# Protection against double-execution -if [[ ! -r "/root" ]] || [[ -r "/root/second_partition_ready" ]] -then - echo "Warning: Ignoring attempted execution of $(basename $0)" - exit 0 -fi - -[[ -x "$(type -P parted)" ]] || \ - die "The parted command is required." - -[[ ! -b ${SLASH_DEVICE}2 ]] || \ - die "Found unexpected block device ${SLASH_DEVICE}2" - -PPRINTCMD="parted --script ${SLASH_DEVICE} print" -FINDMNTCMD="findmnt --source=${SLASH_DEVICE}1 --mountpoint=/ --canonicalize --evaluate --first-only --noheadings" -TMPF=$(mktemp -p '' $(basename $0)_XXXX) -trap "rm -f $TMPF" EXIT - -if $FINDMNTCMD | tee $TMPF | egrep -q "^/\s+${SLASH_DEVICE}1" -then - echo "Repartitioning original partition table:" - $PPRINTCMD -else - die "Unexpected output from '$FINDMNTCMD': $(<$TMPF)" -fi - -echo "Adding partition offset within unpartitioned space." -parted --script --align optimal $SLASH_DEVICE unit % mkpart primary "" "" "$NEW_PART_START" "$NEW_PART_END" - -echo "New partition table:" -$PPRINTCMD - -echo "Growing ${SLASH_DEVICE}1 meet start of ${SLASH_DEVICE}2" -growpart ${SLASH_DEVICE} 1 - -FSTYPE=$(findmnt --first-only --noheadings --output FSTYPE ${SLASH_DEVICE}1) -echo "Expanding $FSTYPE filesystem on ${SLASH_DEVICE}1" -case $FSTYPE in - ext*) resize2fs ${SLASH_DEVICE}1 ;; - *) die "Script $(basename $0) doesn't know how to resize a $FSTYPE filesystem." ;; -esac - -# Must happen last - signals completion to other tooling -echo "Recording newly available disk partition device into /root/second_partition_ready" -echo "${SLASH_DEVICE}2" > /root/second_partition_ready diff --git a/contrib/cirrus/setup.sh b/contrib/cirrus/setup.sh index c41828e5a81..f792f2ee004 100755 --- a/contrib/cirrus/setup.sh +++ b/contrib/cirrus/setup.sh @@ -14,12 +14,6 @@ echo "Setting up $OS_RELEASE_ID $OS_RELEASE_VER" cd $GOSRC case "$OS_RELEASE_ID" in fedora) - # Not executing IN_PODMAN container - if [[ -z "$CONTAINER" ]]; then - warn "Adding secondary testing partition & growing root filesystem" - bash $SCRIPT_BASE/add_second_partition.sh - fi - warn "Hard-coding podman to use crun" cat > /etc/containers/containers.conf <