mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-03-22 08:51:30 +03:00
CI: Add Alpine Linux 3.23 runner to the pipeline (#18087)
Add an Alpine Linux 3.23 runner to the CI chain to run OpenZFS builds and tests against musl libc. Currently, zfs_send_sparse is killed after 10 minutes on Alpine, causing cascading EBUSY failures in the test suite. With zfs_send_sparse disabled, the ZFS test suite reaches a pass rate of 94.62%. This commit introduces the required Alpine-specific setup and a small set of shell and cloud-init compatibility fixes that also apply to existing Linux runners. The Alpine runner is not enabled by default and is not executed for new pull requests. Sponsored-by: ERNW Research GmbH - https://ernw-research.de/ Signed-off-by: Alexander Moch <amoch@ernw.de> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Tony Hutter <hutter2@llnl.gov> Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de>
This commit is contained in:
parent
e72f3054e3
commit
b9b84445ea
48
.github/workflows/scripts/qemu-2-start.sh
vendored
48
.github/workflows/scripts/qemu-2-start.sh
vendored
@ -43,6 +43,12 @@ case "$OS" in
|
|||||||
OSv="almalinux9"
|
OSv="almalinux9"
|
||||||
URL="https://repo.almalinux.org/almalinux/10/cloud/x86_64/images/AlmaLinux-10-GenericCloud-latest.x86_64.qcow2"
|
URL="https://repo.almalinux.org/almalinux/10/cloud/x86_64/images/AlmaLinux-10-GenericCloud-latest.x86_64.qcow2"
|
||||||
;;
|
;;
|
||||||
|
alpine3-23)
|
||||||
|
OSNAME="Alpine Linux 3.23.2"
|
||||||
|
# Alpine Linux v3.22 and v3.23 are unknown to osinfo as of 2025-12-26.
|
||||||
|
OSv="alpinelinux3.21"
|
||||||
|
URL="https://dl-cdn.alpinelinux.org/alpine/v3.23/releases/cloud/generic_alpine-3.23.2-x86_64-bios-cloudinit-r0.qcow2"
|
||||||
|
;;
|
||||||
archlinux)
|
archlinux)
|
||||||
OSNAME="Archlinux"
|
OSNAME="Archlinux"
|
||||||
URL="https://geo.mirror.pkgbuild.com/images/latest/Arch-Linux-x86_64-cloudimg.qcow2"
|
URL="https://geo.mirror.pkgbuild.com/images/latest/Arch-Linux-x86_64-cloudimg.qcow2"
|
||||||
@ -216,13 +222,21 @@ if [ ${OS:0:7} != "freebsd" ]; then
|
|||||||
hostname: $OS
|
hostname: $OS
|
||||||
|
|
||||||
users:
|
users:
|
||||||
- name: root
|
- name: root
|
||||||
shell: $BASH
|
shell: /bin/bash
|
||||||
- name: zfs
|
sudo: ['ALL=(ALL) NOPASSWD:ALL']
|
||||||
sudo: ALL=(ALL) NOPASSWD:ALL
|
- name: zfs
|
||||||
shell: $BASH
|
shell: /bin/bash
|
||||||
ssh_authorized_keys:
|
sudo: ['ALL=(ALL) NOPASSWD:ALL']
|
||||||
- $PUBKEY
|
ssh_authorized_keys:
|
||||||
|
- $PUBKEY
|
||||||
|
# Workaround for Alpine Linux.
|
||||||
|
lock_passwd: false
|
||||||
|
passwd: '*'
|
||||||
|
|
||||||
|
packages:
|
||||||
|
- sudo
|
||||||
|
- bash
|
||||||
|
|
||||||
growpart:
|
growpart:
|
||||||
mode: auto
|
mode: auto
|
||||||
@ -305,3 +319,23 @@ else
|
|||||||
scp ~/src.txz "root@vm0:/tmp/src.txz"
|
scp ~/src.txz "root@vm0:/tmp/src.txz"
|
||||||
ssh root@vm0 'tar -C / -zxf /tmp/src.txz'
|
ssh root@vm0 'tar -C / -zxf /tmp/src.txz'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
#
|
||||||
|
# Config for Alpine Linux similar to FreeBSD.
|
||||||
|
#
|
||||||
|
if [ ${OS:0:6} == "alpine" ]; then
|
||||||
|
while pidof /usr/bin/qemu-system-x86_64 >/dev/null; do
|
||||||
|
ssh 2>/dev/null zfs@vm0 "uname -a" && break
|
||||||
|
done
|
||||||
|
# Enable community and testing repositories.
|
||||||
|
ssh zfs@vm0 "sudo rm -rf /etc/apk/repositories"
|
||||||
|
ssh zfs@vm0 "sudo setup-apkrepos -c1"
|
||||||
|
ssh zfs@vm0 "echo '@testing http://dl-cdn.alpinelinux.org/alpine/edge/testing' | sudo tee -a /etc/apk/repositories"
|
||||||
|
# Upgrade to edge or latest-stable.
|
||||||
|
#ssh zfs@vm0 "sudo sed -i 's#/v[0-9]\+\.[0-9]\+/#/edge/#g' /etc/apk/repositories"
|
||||||
|
#ssh zfs@vm0 "sudo sed -i 's#/v[0-9]\+\.[0-9]\+/#/latest-stable/#g' /etc/apk/repositories"
|
||||||
|
# Update and upgrade after repository setup.
|
||||||
|
ssh zfs@vm0 "sudo apk update"
|
||||||
|
ssh zfs@vm0 "sudo apk add --upgrade apk-tools"
|
||||||
|
ssh zfs@vm0 "sudo apk upgrade --available"
|
||||||
|
fi
|
||||||
|
|||||||
45
.github/workflows/scripts/qemu-3-deps-vm.sh
vendored
45
.github/workflows/scripts/qemu-3-deps-vm.sh
vendored
@ -10,6 +10,32 @@
|
|||||||
|
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
|
function alpine() {
|
||||||
|
echo "##[group]Install Development Tools"
|
||||||
|
sudo apk add \
|
||||||
|
acl alpine-sdk attr autoconf automake bash build-base clang21 coreutils \
|
||||||
|
cpio cryptsetup curl curl-dev dhcpcd eudev eudev-dev eudev-libs findutils \
|
||||||
|
fio gawk gdb gettext-dev git grep jq libaio libaio-dev libcurl \
|
||||||
|
libtirpc-dev libtool libunwind libunwind-dev linux-headers linux-tools \
|
||||||
|
linux-virt linux-virt-dev lsscsi m4 make nfs-utils openssl-dev parted \
|
||||||
|
pax procps py3-cffi py3-distlib py3-packaging py3-setuptools python3 \
|
||||||
|
python3-dev qemu-guest-agent rng-tools rsync samba samba-server sed \
|
||||||
|
strace sysstat util-linux util-linux-dev wget words xfsprogs xxhash \
|
||||||
|
zlib-dev pamtester@testing
|
||||||
|
echo "##[endgroup]"
|
||||||
|
|
||||||
|
echo "##[group]Switch to eudev"
|
||||||
|
sudo setup-devd udev
|
||||||
|
echo "##[endgroup]"
|
||||||
|
|
||||||
|
echo "##[group]Install ksh93 from Source"
|
||||||
|
git clone --depth 1 https://github.com/ksh93/ksh.git /tmp/ksh
|
||||||
|
cd /tmp/ksh
|
||||||
|
./bin/package make
|
||||||
|
sudo ./bin/package install /
|
||||||
|
echo "##[endgroup]"
|
||||||
|
}
|
||||||
|
|
||||||
function archlinux() {
|
function archlinux() {
|
||||||
echo "##[group]Running pacman -Syu"
|
echo "##[group]Running pacman -Syu"
|
||||||
sudo btrfs filesystem resize max /
|
sudo btrfs filesystem resize max /
|
||||||
@ -27,6 +53,10 @@ function archlinux() {
|
|||||||
function debian() {
|
function debian() {
|
||||||
export DEBIAN_FRONTEND="noninteractive"
|
export DEBIAN_FRONTEND="noninteractive"
|
||||||
|
|
||||||
|
echo "##[group]Wait for cloud-init to finish"
|
||||||
|
cloud-init status --wait
|
||||||
|
echo "##[endgroup]"
|
||||||
|
|
||||||
echo "##[group]Running apt-get update+upgrade"
|
echo "##[group]Running apt-get update+upgrade"
|
||||||
sudo sed -i '/[[:alpha:]]-backports/d' /etc/apt/sources.list
|
sudo sed -i '/[[:alpha:]]-backports/d' /etc/apt/sources.list
|
||||||
sudo apt-get update -y
|
sudo apt-get update -y
|
||||||
@ -140,6 +170,9 @@ case "$1" in
|
|||||||
sudo dnf install -y kernel-abi-stablelists
|
sudo dnf install -y kernel-abi-stablelists
|
||||||
echo "##[endgroup]"
|
echo "##[endgroup]"
|
||||||
;;
|
;;
|
||||||
|
alpine*)
|
||||||
|
alpine
|
||||||
|
;;
|
||||||
archlinux)
|
archlinux)
|
||||||
archlinux
|
archlinux
|
||||||
;;
|
;;
|
||||||
@ -188,6 +221,16 @@ test -z "${ONLY_DEPS:-}" || exit 0
|
|||||||
# Start services
|
# Start services
|
||||||
echo "##[group]Enable services"
|
echo "##[group]Enable services"
|
||||||
case "$1" in
|
case "$1" in
|
||||||
|
alpine*)
|
||||||
|
sudo -E rc-update add qemu-guest-agent
|
||||||
|
sudo -E rc-update add nfs
|
||||||
|
sudo -E rc-update add samba
|
||||||
|
sudo -E rc-update add dhcpcd
|
||||||
|
# Remove services related to cloud-init.
|
||||||
|
sudo -E rc-update del cloud-init default
|
||||||
|
sudo -E rc-update del cloud-final default
|
||||||
|
sudo -E rc-update del cloud-config default
|
||||||
|
;;
|
||||||
freebsd*)
|
freebsd*)
|
||||||
# add virtio things
|
# add virtio things
|
||||||
echo 'virtio_load="YES"' | sudo -E tee -a /boot/loader.conf
|
echo 'virtio_load="YES"' | sudo -E tee -a /boot/loader.conf
|
||||||
@ -243,7 +286,7 @@ case "$1" in
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
archlinux|freebsd*)
|
alpine*|archlinux|freebsd*)
|
||||||
true
|
true
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
|||||||
22
.github/workflows/scripts/qemu-5-setup.sh
vendored
22
.github/workflows/scripts/qemu-5-setup.sh
vendored
@ -58,13 +58,21 @@ for ((i=1; i<=VMs; i++)); do
|
|||||||
fqdn: vm$i
|
fqdn: vm$i
|
||||||
|
|
||||||
users:
|
users:
|
||||||
- name: root
|
- name: root
|
||||||
shell: $BASH
|
shell: /bin/bash
|
||||||
- name: zfs
|
sudo: ['ALL=(ALL) NOPASSWD:ALL']
|
||||||
sudo: ALL=(ALL) NOPASSWD:ALL
|
- name: zfs
|
||||||
shell: $BASH
|
shell: /bin/bash
|
||||||
ssh_authorized_keys:
|
sudo: ['ALL=(ALL) NOPASSWD:ALL']
|
||||||
- $PUBKEY
|
ssh_authorized_keys:
|
||||||
|
- $PUBKEY
|
||||||
|
# Workaround for Alpine Linux.
|
||||||
|
lock_passwd: false
|
||||||
|
passwd: '*'
|
||||||
|
|
||||||
|
packages:
|
||||||
|
- sudo
|
||||||
|
- bash
|
||||||
|
|
||||||
growpart:
|
growpart:
|
||||||
mode: auto
|
mode: auto
|
||||||
|
|||||||
9
.github/workflows/scripts/qemu-6-tests.sh
vendored
9
.github/workflows/scripts/qemu-6-tests.sh
vendored
@ -95,11 +95,18 @@ case "$1" in
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# enable io_uring on el9/el10
|
# Distribution-specific settings.
|
||||||
case "$1" in
|
case "$1" in
|
||||||
almalinux9|almalinux10|centos-stream*)
|
almalinux9|almalinux10|centos-stream*)
|
||||||
|
# Enable io_uring on Enterprise Linux 9 and 10.
|
||||||
sudo sysctl kernel.io_uring_disabled=0 > /dev/null
|
sudo sysctl kernel.io_uring_disabled=0 > /dev/null
|
||||||
;;
|
;;
|
||||||
|
alpine*)
|
||||||
|
# Ensure `/etc/zfs/zpool.cache` exists.
|
||||||
|
sudo mkdir -p /etc/zfs
|
||||||
|
sudo touch /etc/zfs/zpool.cache
|
||||||
|
sudo chmod 644 /etc/zfs/zpool.cache
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# run functional testings and save exitcode
|
# run functional testings and save exitcode
|
||||||
|
|||||||
8
.github/workflows/zfs-qemu.yml
vendored
8
.github/workflows/zfs-qemu.yml
vendored
@ -10,6 +10,11 @@ on:
|
|||||||
required: false
|
required: false
|
||||||
default: ""
|
default: ""
|
||||||
description: "(optional) Experimental kernel version to install on Fedora (like '6.14' or '6.13.3-0.rc3')"
|
description: "(optional) Experimental kernel version to install on Fedora (like '6.14' or '6.13.3-0.rc3')"
|
||||||
|
specific_os:
|
||||||
|
type: string
|
||||||
|
required: false
|
||||||
|
default: ""
|
||||||
|
description: "(optional) Only run on this specific OS (like 'fedora42' or 'alpine3-23')"
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||||
@ -58,6 +63,9 @@ jobs:
|
|||||||
# They specified a custom kernel version for Fedora.
|
# They specified a custom kernel version for Fedora.
|
||||||
# Use only Fedora runners.
|
# Use only Fedora runners.
|
||||||
os_json=$(echo ${os_selection} | jq -c '[.[] | select(startswith("fedora"))]')
|
os_json=$(echo ${os_selection} | jq -c '[.[] | select(startswith("fedora"))]')
|
||||||
|
elif ${{ github.event.inputs.specific_os != '' }}; then
|
||||||
|
# Use only the specified runner.
|
||||||
|
os_json=$(jq -cn --arg os "${{ github.event.inputs.specific_os }}" '[ $os ]')
|
||||||
else
|
else
|
||||||
# Normal case
|
# Normal case
|
||||||
os_json=$(echo ${os_selection} | jq -c)
|
os_json=$(echo ${os_selection} | jq -c)
|
||||||
|
|||||||
@ -26,7 +26,7 @@ echo "================================================================="
|
|||||||
sudo tail -n $lines /proc/spl/kstat/zfs/dbgmsg
|
sudo tail -n $lines /proc/spl/kstat/zfs/dbgmsg
|
||||||
|
|
||||||
# reset dbgmsg
|
# reset dbgmsg
|
||||||
sudo bash -c "echo > /proc/spl/kstat/zfs/dbgmsg"
|
sudo sh -c "echo > /proc/spl/kstat/zfs/dbgmsg"
|
||||||
|
|
||||||
echo "================================================================="
|
echo "================================================================="
|
||||||
echo " End of zfs_dbgmsg log"
|
echo " End of zfs_dbgmsg log"
|
||||||
|
|||||||
@ -31,7 +31,7 @@ for f in /proc/spl/kstat/zfs/*/multihost; do
|
|||||||
echo "================================================================="
|
echo "================================================================="
|
||||||
|
|
||||||
sudo tail -n $lines $f
|
sudo tail -n $lines $f
|
||||||
sudo bash -c "echo > $f"
|
sudo sh -c "echo > $f"
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "================================================================="
|
echo "================================================================="
|
||||||
|
|||||||
@ -559,7 +559,7 @@ function default_cleanup_noexit
|
|||||||
# Here, we loop through the pools we're allowed to
|
# Here, we loop through the pools we're allowed to
|
||||||
# destroy, only destroying them if it's safe to do
|
# destroy, only destroying them if it's safe to do
|
||||||
# so.
|
# so.
|
||||||
while [ ! -z ${ALL_POOLS} ]
|
while [ -n "${ALL_POOLS}" ]
|
||||||
do
|
do
|
||||||
for pool in ${ALL_POOLS}
|
for pool in ${ALL_POOLS}
|
||||||
do
|
do
|
||||||
|
|||||||
@ -79,7 +79,8 @@ function do_test
|
|||||||
imgfile=$1
|
imgfile=$1
|
||||||
log_note "Running test on $imgfile"
|
log_note "Running test on $imgfile"
|
||||||
log_must losetup -f $imgfile
|
log_must losetup -f $imgfile
|
||||||
DEV=$(losetup --associated $imgfile | grep -Eo '^/dev/loop[0-9]+')
|
# Alpine Linux loop devices appear as `/dev/loop/N` instead of `/dev/loopN`.
|
||||||
|
DEV=$(losetup --associated $imgfile | grep -Eo '^/dev/loop/?[0-9]+')
|
||||||
log_must mkfs.xfs $DEV
|
log_must mkfs.xfs $DEV
|
||||||
mkdir $TEST_BASE_DIR/mnt
|
mkdir $TEST_BASE_DIR/mnt
|
||||||
log_must mount $DEV $TEST_BASE_DIR/mnt
|
log_must mount $DEV $TEST_BASE_DIR/mnt
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user