From: "Michael Köppl" <m.koeppl@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH e2e-tests 8/8] scripts: drop the scripts now shipped by proxmox-test-instance
Date: Tue, 1 Dec 2026 15:58:17 +0100 [thread overview]
Message-ID: <20261201145817.894414-9-m.koeppl@proxmox.com> (raw)
In-Reply-To: <20261201145817.894414-1-m.koeppl@proxmox.com>
proxmox-test-instance ships the removed scripts as builtin hooks and the
plan files use those since the previous commit. Removing the scripts
here entirely avoids the builtin scripts and these scripts drifting
apart.
The scripts specific to these tests stay, as they're not useful to
testing setups in general, but only for specific scenarios.
Signed-off-by: Michael Köppl <m.koeppl@proxmox.com>
---
scripts/download-cloud-image.sh | 21 ---------
scripts/download-container-image.sh | 22 ---------
scripts/install-ceph.sh | 13 ------
scripts/setup-frr.sh | 18 --------
scripts/setup-zfs-storage.sh | 65 ---------------------------
scripts/update-packages.sh | 69 -----------------------------
6 files changed, 208 deletions(-)
delete mode 100755 scripts/download-cloud-image.sh
delete mode 100755 scripts/download-container-image.sh
delete mode 100755 scripts/install-ceph.sh
delete mode 100755 scripts/setup-frr.sh
delete mode 100755 scripts/setup-zfs-storage.sh
delete mode 100755 scripts/update-packages.sh
diff --git a/scripts/download-cloud-image.sh b/scripts/download-cloud-image.sh
deleted file mode 100755
index e3514d0..0000000
--- a/scripts/download-cloud-image.sh
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/usr/bin/bash
-# Downloads a VM disk image to the import content of a storage, so that VMs can be created from it
-# with 'import-from'. The download is only kept if it matches the given SHA-512 checksum.
-SSH_KEY=$(jq -r '.ssh_private_keyfile' "$CONFIG_PATH")
-HOST=$(jq -r '.host' "$CONFIG_PATH")
-USER=$(jq -r '.ssh_user' "$CONFIG_PATH")
-
-STORAGE=$1
-URL=$2
-FILENAME=$3
-SHA512=$4
-
-ssh -i "$SSH_KEY" "$USER"@"$HOST" -o StrictHostKeyChecking=no <<EOF
-set -e
-
-pvesh create /nodes/localhost/storage/$STORAGE/download-url --content import \
- --url '$URL' --filename '$FILENAME' --checksum $SHA512 --checksum-algorithm sha512
-# Check the file itself. pvesh exits with 0 even if the download failed, which leaves a file that
-# already exists in place, whatever its content.
-echo "$SHA512 \$(pvesm path $STORAGE:import/$FILENAME)" | sha512sum --check --quiet
-EOF
diff --git a/scripts/download-container-image.sh b/scripts/download-container-image.sh
deleted file mode 100755
index 5db8af8..0000000
--- a/scripts/download-container-image.sh
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/usr/bin/bash
-SSH_KEY=$(jq -r '.ssh_private_keyfile' $CONFIG_PATH)
-HOST=$(jq -r '.host' $CONFIG_PATH)
-USER=$(jq -r '.ssh_user' $CONFIG_PATH)
-
-STORAGE=$1
-IMAGE=$2
-
-ssh -i $SSH_KEY $USER@$HOST -o StrictHostKeyChecking=no <<EOF
-set -e
-
-path=\$(pvesm path $STORAGE:vztmpl/$IMAGE)
-# Sometimes requests are rejected with 503, to try again after a while.
-for attempt in 1 2 3 4 5; do
- pveam download $STORAGE $IMAGE || true
- # Explicitly check for the path, since download will still return 0 if it fails.
- [ -e "\$path" ] && exit 0
- sleep \$((attempt * 10))
-done
-echo "downloading $IMAGE to $STORAGE failed" >&2
-exit 1
-EOF
diff --git a/scripts/install-ceph.sh b/scripts/install-ceph.sh
deleted file mode 100755
index 2ca2d91..0000000
--- a/scripts/install-ceph.sh
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/bash
-SSH_KEY=$(jq -r '.ssh_private_keyfile' $CONFIG_PATH)
-HOST=$(jq -r '.host' $CONFIG_PATH)
-USER=$(jq -r '.ssh_user' $CONFIG_PATH)
-
-VERSION=$1
-REPOSITORY=$2
-
-ssh -i $SSH_KEY $USER@$HOST -o StrictHostKeyChecking=no <<EOT
-set -e
-
-yes | pveceph install --version $VERSION --repository $REPOSITORY
-EOT
diff --git a/scripts/setup-frr.sh b/scripts/setup-frr.sh
deleted file mode 100755
index b647345..0000000
--- a/scripts/setup-frr.sh
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/usr/bin/bash
-SSH_KEY=$(jq -r '.ssh_private_keyfile' $CONFIG_PATH)
-HOST=$(jq -r '.host' $CONFIG_PATH)
-USER=$(jq -r '.ssh_user' $CONFIG_PATH)
-
-ssh -i $SSH_KEY $USER@$HOST -o StrictHostKeyChecking=no <<'EOF'
-set -e
-
-echo -e "LANG=C\nLC_ALL=C" | tee /etc/default/locale /etc/environment
-export LANG=C LC_ALL=C
-
-export DEBIAN_FRONTEND=noninteractive
-apt-get -y update
-apt-get -y dist-upgrade
-apt-get -y install frr vlan
-
-systemctl enable --now frr
-EOF
diff --git a/scripts/setup-zfs-storage.sh b/scripts/setup-zfs-storage.sh
deleted file mode 100755
index 79e3cb1..0000000
--- a/scripts/setup-zfs-storage.sh
+++ /dev/null
@@ -1,65 +0,0 @@
-#!/usr/bin/bash
-# Create a ZFS pool on an additional disk of a PVE node and register it as a zfspool storage, so
-# tests that need ZFS-backed guest images (storage replication) find one.
-#
-# Usage: setup-zfs-storage.sh <disk-serial> <name>
-#
-# The cluster nodes of plans/complete.ron install on XFS. The ZFS pool lives on an extra disk, found
-# by the serial the plan assigned to it. The name is used both for the pool and for the storage id.
-# The disk is looked up by ID_SCSI_SERIAL.
-#
-# Enabling zfs-import@<pool> is what makes the pool come back after the node is powered down at
-# the end of the setup.
-
-set -euo pipefail
-
-SSH_KEY=$(jq -r '.ssh_private_keyfile' $CONFIG_PATH)
-HOST=$(jq -r '.host' $CONFIG_PATH)
-USER=$(jq -r '.ssh_user' $CONFIG_PATH)
-
-SERIAL=$1
-POOL=$2
-
-ssh -i $SSH_KEY $USER@$HOST -o StrictHostKeyChecking=no bash -s -- "$SERIAL" "$POOL" <<'EOF'
-set -e
-
-serial=$1
-pool=$2
-
-dev=""
-for disk in /dev/sd?; do
- udevadm info --query=property --name="$disk" | grep -qx "ID_SCSI_SERIAL=$serial" || continue
- dev="$disk"
- break
-done
-
-if [ -z "$dev" ]; then
- echo "no disk with SCSI serial '$serial' on $(hostname); disks on this node:" >&2
- for disk in /dev/sd?; do
- echo " $disk $(udevadm info --query=property --name="$disk" \
- | grep '^ID_SCSI_SERIAL=' || echo 'ID_SCSI_SERIAL=')" >&2
- done
- exit 1
-fi
-
-# Prefer the persistent link, as PVE's disk management does, and fall back to the device node
-# for a disk udev created no such link for.
-if link=$(udevadm info --query=symlink --name="$dev" | tr ' ' '\n' | grep -m1 '^disk/by-id/scsi-')
-then
- dev="/dev/$link"
-fi
-
-if ! zpool list -H "$pool" >/dev/null 2>&1; then
- zpool create -o ashift=12 "$pool" "$dev"
- zfs set compression=on "$pool"
-fi
-
-if [ -e /lib/systemd/system/zfs-import@.service ]; then
- systemctl enable "zfs-import@$pool.service"
-fi
-
-# The storage is what the tests look for, so it needs the content types for guest images.
-if ! pvesm status --storage "$pool" >/dev/null 2>&1; then
- pvesm add zfspool "$pool" --pool "$pool" --content images,rootdir --sparse 1
-fi
-EOF
diff --git a/scripts/update-packages.sh b/scripts/update-packages.sh
deleted file mode 100755
index eb96594..0000000
--- a/scripts/update-packages.sh
+++ /dev/null
@@ -1,69 +0,0 @@
-#!/usr/bin/bash
-SSH_KEY=$(jq -r '.ssh_private_keyfile' $CONFIG_PATH)
-HOST=$(jq -r '.host' $CONFIG_PATH)
-USER=$(jq -r '.ssh_user' $CONFIG_PATH)
-
-product=$1
-repo=$2
-
-case $product in
- "pve")
- maj=9
- ;;
- "pmg")
- maj=9
- ;;
- "pbs")
- maj=4
- ;;
- "pdm")
- maj=1
- ;;
- *)
- echo "unknown product: $product"
- exit 1
- ;;
-esac
-
-case $repo in
- "staging")
- full_repo="Types: deb
-URIs: http://repo.intra.proxmox.com/staging/${product}
-Suites: trixie
-Components: ${product}-${maj}
-Signed-By: /usr/share/keyrings/proxmox-archive-keyring.gpg"
- ;;
- "no-subscription")
- full_repo="Types: deb
-URIs: http://download.proxmox.com/debian/${product}
-Suites: trixie
-Components: ${product}-no-subscription
-Signed-By: /usr/share/keyrings/proxmox-archive-keyring.gpg"
- ;;
- "test")
- full_repo="Types: deb
-URIs: http://download.proxmox.com/debian/${product}
-Suites: trixie
-Components: ${product}-test
-Signed-By: /usr/share/keyrings/proxmox-archive-keyring.gpg"
- ;;
-esac
-
-ssh -i $SSH_KEY $USER@$HOST -o StrictHostKeyChecking=no <<EOF
-set -e
-
-echo "Update packages hook running"
-
-tee > /etc/apt/sources.list.d/pve-$repo.sources <<EOT
-$full_repo
-EOT
-
-rm -f /etc/apt/sources.list.d/pve-enterprise.sources
-rm -f /etc/apt/sources.list.d/pbs-enterprise.sources
-rm -f /etc/apt/sources.list.d/pmg-enterprise.sources
-rm -f /etc/apt/sources.list.d/ceph.sources
-
-export DEBIAN_FRONTEND=noninteractive
-apt-get update -y
-apt-get dist-upgrade -y
-EOF
--
2.47.3
prev parent reply other threads:[~2026-12-01 14:59 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-01 14:58 [PATCH e2e-tests/test-tools 0/8] instance: rework hooks and set up Ceph as a cluster hook Michael Köppl
2026-12-01 14:58 ` [PATCH test-tools 1/8] readme: drop token fields from the hook config example Michael Köppl
2026-12-01 14:58 ` [PATCH test-tools 2/8] instance: ship generic hook scripts Michael Köppl
2026-12-01 14:58 ` [PATCH test-tools 3/8] instance: distinguish builtin hooks from hook files Michael Köppl
2026-12-01 14:58 ` [PATCH test-tools 4/8] instance: add hooks that run once a cluster is formed Michael Köppl
2026-12-01 14:58 ` [PATCH test-tools 5/8] instance: cli: run a script once for a whole cluster Michael Köppl
2026-12-01 14:58 ` [PATCH test-tools 6/8] instance: add a builtin hook to set up a Ceph cluster Michael Köppl
2026-12-01 14:58 ` [PATCH e2e-tests 7/8] plans: use the hook scripts shipped with proxmox-test-instance Michael Köppl
2026-12-01 14:58 ` Michael Köppl [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261201145817.894414-9-m.koeppl@proxmox.com \
--to=m.koeppl@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.