diff options
Diffstat (limited to 'sys/contrib/openzfs/.github')
11 files changed, 117 insertions, 40 deletions
| diff --git a/sys/contrib/openzfs/.github/ISSUE_TEMPLATE/feature_request.md b/sys/contrib/openzfs/.github/ISSUE_TEMPLATE/feature_request.md index 9b50a4a3d96e..f3d4316f6f67 100644 --- a/sys/contrib/openzfs/.github/ISSUE_TEMPLATE/feature_request.md +++ b/sys/contrib/openzfs/.github/ISSUE_TEMPLATE/feature_request.md @@ -14,7 +14,7 @@ Please check our issue tracker before opening a new feature request.  Filling out the following template will help other contributors better understand your proposed feature.  --> -### Describe the feature would like to see added to OpenZFS +### Describe the feature you would like to see added to OpenZFS  <!--  Provide a clear and concise description of the feature. diff --git a/sys/contrib/openzfs/.github/PULL_REQUEST_TEMPLATE.md b/sys/contrib/openzfs/.github/PULL_REQUEST_TEMPLATE.md index 79809179cf13..47edc8174603 100644 --- a/sys/contrib/openzfs/.github/PULL_REQUEST_TEMPLATE.md +++ b/sys/contrib/openzfs/.github/PULL_REQUEST_TEMPLATE.md @@ -2,11 +2,6 @@  <!--- Provide a general summary of your changes in the Title above --> -<!--- -Documentation on ZFS Buildbot options can be found at -https://openzfs.github.io/openzfs-docs/Developer%20Resources/Buildbot%20Options.html ---> -  ### Motivation and Context  <!--- Why is this change required? What problem does it solve? -->  <!--- If it fixes an open issue, please link to the issue here. --> diff --git a/sys/contrib/openzfs/.github/workflows/scripts/generate-ci-type.py b/sys/contrib/openzfs/.github/workflows/scripts/generate-ci-type.py index b49255e8381d..08021aabcb61 100755 --- a/sys/contrib/openzfs/.github/workflows/scripts/generate-ci-type.py +++ b/sys/contrib/openzfs/.github/workflows/scripts/generate-ci-type.py @@ -65,7 +65,7 @@ if __name__ == '__main__':      # check last (HEAD) commit message      last_commit_message_raw = subprocess.run([ -        'git', 'show', '-s', '--format=%B', 'HEAD' +        'git', 'show', '-s', '--format=%B', head      ], check=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)      for line in last_commit_message_raw.stdout.decode().splitlines(): diff --git a/sys/contrib/openzfs/.github/workflows/scripts/qemu-1-setup.sh b/sys/contrib/openzfs/.github/workflows/scripts/qemu-1-setup.sh index de29ad1f57b6..0278264d9279 100755 --- a/sys/contrib/openzfs/.github/workflows/scripts/qemu-1-setup.sh +++ b/sys/contrib/openzfs/.github/workflows/scripts/qemu-1-setup.sh @@ -6,6 +6,13 @@  set -eu +# We've been seeing this script take over 15min to run.  This may or +# may not be normal.  Just to get a little more insight, print out +# a message to stdout with the top running process, and do this every +# 30 seconds.  We can delete this watchdog later once we get a better +# handle on what the timeout value should be. +(while [ 1 ] ; do sleep 30 && echo "[watchdog: $(ps -eo cmd --sort=-pcpu  | head -n 2 | tail -n 1)}')]"; done) & +  # install needed packages  export DEBIAN_FRONTEND="noninteractive"  sudo apt-get -y update @@ -65,3 +72,6 @@ sudo zpool create -f -o ashift=12 zpool $SSD1 $SSD2 -O relatime=off \  for i in /sys/block/s*/queue/scheduler; do    echo "none" | sudo tee $i  done + +# Kill off our watchdog +kill $(jobs -p) diff --git a/sys/contrib/openzfs/.github/workflows/scripts/qemu-2-start.sh b/sys/contrib/openzfs/.github/workflows/scripts/qemu-2-start.sh index 885a64037f89..422b3e9df388 100755 --- a/sys/contrib/openzfs/.github/workflows/scripts/qemu-2-start.sh +++ b/sys/contrib/openzfs/.github/workflows/scripts/qemu-2-start.sh @@ -25,6 +25,10 @@ UBMIRROR="https://cloud-images.ubuntu.com"  # default nic model for vm's  NIC="virtio" +# additional options for virt-install +OPTS[0]="" +OPTS[1]="" +  case "$OS" in    almalinux8)      OSNAME="AlmaLinux 8" @@ -61,6 +65,14 @@ case "$OS" in      OSNAME="Debian 12"      URL="https://cloud.debian.org/images/cloud/bookworm/latest/debian-12-generic-amd64.qcow2"      ;; +  debian13) +    OSNAME="Debian 13" +    # TODO: Overwrite OSv to debian13 for virt-install until it's added to osinfo +    OSv="debian12" +    URL="https://cloud.debian.org/images/cloud/trixie/latest/debian-13-generic-amd64.qcow2" +    OPTS[0]="--boot" +    OPTS[1]="uefi=on" +    ;;    fedora41)      OSNAME="Fedora 41"      OSv="fedora-unknown" @@ -109,7 +121,14 @@ case "$OS" in      KSRC="$FREEBSD_SNAP/../amd64/$FreeBSD/src.txz"      ;;    freebsd15-0c) -    FreeBSD="15.0-CURRENT" +    FreeBSD="15.0-ALPHA4" +    OSNAME="FreeBSD $FreeBSD" +    OSv="freebsd14.0" +    URLxz="$FREEBSD_SNAP/$FreeBSD/amd64/Latest/FreeBSD-$FreeBSD-amd64-BASIC-CI-ufs.raw.xz" +    KSRC="$FREEBSD_SNAP/../amd64/$FreeBSD/src.txz" +    ;; +  freebsd16-0c) +    FreeBSD="16.0-CURRENT"      OSNAME="FreeBSD $FreeBSD"      OSv="freebsd14.0"      URLxz="$FREEBSD_SNAP/$FreeBSD/amd64/Latest/FreeBSD-$FreeBSD-amd64-BASIC-CI-ufs.raw.xz" @@ -242,7 +261,7 @@ sudo virt-install \    --network bridge=virbr0,model=$NIC,mac='52:54:00:83:79:00' \    --cloud-init user-data=/tmp/user-data \    --disk $DISK,bus=virtio,cache=none,format=raw,driver.discard=unmap \ -  --import --noautoconsole >/dev/null +  --import --noautoconsole ${OPTS[0]} ${OPTS[1]} >/dev/null  # Give the VMs hostnames so we don't have to refer to them with  # hardcoded IP addresses. @@ -275,7 +294,7 @@ else    while pidof /usr/bin/qemu-system-x86_64 >/dev/null; do      ssh 2>/dev/null root@vm0 "uname -a" && break    done -  ssh root@vm0 "pkg install -y bash ca_root_nss git qemu-guest-agent python3 py311-cloud-init" +  ssh root@vm0 "env IGNORE_OSVERSION=yes pkg install -y bash ca_root_nss git qemu-guest-agent python3 py311-cloud-init"    ssh root@vm0 "chsh -s $BASH root"    ssh root@vm0 'sysrc qemu_guest_agent_enable="YES"'    ssh root@vm0 'sysrc cloudinit_enable="YES"' diff --git a/sys/contrib/openzfs/.github/workflows/scripts/qemu-3-deps-vm.sh b/sys/contrib/openzfs/.github/workflows/scripts/qemu-3-deps-vm.sh index c41ecd09d52e..f67bb2f68e94 100755 --- a/sys/contrib/openzfs/.github/workflows/scripts/qemu-3-deps-vm.sh +++ b/sys/contrib/openzfs/.github/workflows/scripts/qemu-3-deps-vm.sh @@ -20,7 +20,7 @@ function archlinux() {    sudo pacman -Sy --noconfirm base-devel bc cpio cryptsetup dhclient dkms \      fakeroot fio gdb inetutils jq less linux linux-headers lsscsi nfs-utils \      parted pax perf python-packaging python-setuptools qemu-guest-agent ksh \ -    samba sysstat rng-tools rsync wget xxhash +    samba strace sysstat rng-tools rsync wget xxhash    echo "##[endgroup]"  } @@ -41,9 +41,10 @@ function debian() {      libelf-dev libffi-dev libmount-dev libpam0g-dev libselinux-dev libssl-dev \      libtool libtool-bin libudev-dev libunwind-dev linux-headers-$(uname -r) \      lsscsi nfs-kernel-server pamtester parted python3 python3-all-dev \ -    python3-cffi python3-dev python3-distlib python3-packaging \ +    python3-cffi python3-dev python3-distlib python3-packaging libtirpc-dev \      python3-setuptools python3-sphinx qemu-guest-agent rng-tools rpm2cpio \ -    rsync samba sysstat uuid-dev watchdog wget xfslibs-dev  xxhash zlib1g-dev +    rsync samba strace sysstat uuid-dev watchdog wget xfslibs-dev xxhash \ +    zlib1g-dev    echo "##[endgroup]"  } @@ -87,8 +88,8 @@ function rhel() {      libuuid-devel lsscsi mdadm nfs-utils openssl-devel pam-devel pamtester \      parted perf python3 python3-cffi python3-devel python3-packaging \      kernel-devel python3-setuptools qemu-guest-agent rng-tools rpcgen \ -    rpm-build rsync samba sysstat systemd watchdog wget xfsprogs-devel xxhash \ -    zlib-devel +    rpm-build rsync samba strace sysstat systemd watchdog wget xfsprogs-devel \ +    xxhash zlib-devel    echo "##[endgroup]"  } @@ -104,7 +105,7 @@ function install_fedora_experimental_kernel {    our_version="$1"    sudo dnf -y copr enable @kernel-vanilla/stable    sudo dnf -y copr enable @kernel-vanilla/mainline -  all="$(sudo dnf list --showduplicates kernel-*)" +  all="$(sudo dnf list --showduplicates kernel-* python3-perf* perf* bpftool*)"    echo "Available versions:"    echo "$all" diff --git a/sys/contrib/openzfs/.github/workflows/scripts/qemu-4-build-vm.sh b/sys/contrib/openzfs/.github/workflows/scripts/qemu-4-build-vm.sh index 17e976ebcc39..2807d9e77127 100755 --- a/sys/contrib/openzfs/.github/workflows/scripts/qemu-4-build-vm.sh +++ b/sys/contrib/openzfs/.github/workflows/scripts/qemu-4-build-vm.sh @@ -5,12 +5,13 @@  #  # Usage:  # -#       qemu-4-build-vm.sh OS [--enable-debug][--dkms][--poweroff] -#           [--release][--repo][--tarball] +#       qemu-4-build-vm.sh OS [--enable-debug][--dkms][--patch-level NUM] +#               [--poweroff][--release][--repo][--tarball]  #  # OS:           OS name like 'fedora41'  # --enable-debug:  Build RPMs with '--enable-debug' (for testing)  # --dkms:       Build DKMS RPMs as well +# --patch-level NUM:    Use a custom patch level number for packages.  # --poweroff:   Power-off the VM after building  # --release     Build zfs-release*.rpm as well  # --repo        After building everything, copy RPMs into /tmp/repo @@ -21,6 +22,7 @@  ENABLE_DEBUG=""  DKMS="" +PATCH_LEVEL=""  POWEROFF=""  RELEASE=""  REPO="" @@ -35,6 +37,11 @@ while [[ $# -gt 0 ]]; do        DKMS=1        shift        ;; +    --patch-level) +      PATCH_LEVEL=$2 +      shift +      shift +      ;;      --poweroff)        POWEROFF=1        shift @@ -215,6 +222,10 @@ function rpm_build_and_install() {    run ./autogen.sh    echo "##[endgroup]" +  if [ -n "$PATCH_LEVEL" ] ; then +    sed -i -E 's/(Release:\s+)1/\1'$PATCH_LEVEL'/g' META +  fi +    echo "##[group]Configure"    run ./configure --enable-debuginfo $extra    echo "##[endgroup]" @@ -328,7 +339,13 @@ fi  # almalinux9.5  # fedora42  source /etc/os-release -sudo hostname "$ID$VERSION_ID" + if which hostnamectl &> /dev/null ; then +  # Fedora 42+ use hostnamectl +  sudo hostnamectl set-hostname "$ID$VERSION_ID" +  sudo hostnamectl set-hostname --pretty "$ID$VERSION_ID" +else +  sudo hostname "$ID$VERSION_ID" +fi  # save some sysinfo  uname -a > /var/tmp/uname.txt diff --git a/sys/contrib/openzfs/.github/workflows/scripts/qemu-5-setup.sh b/sys/contrib/openzfs/.github/workflows/scripts/qemu-5-setup.sh index 6bf10024a1a6..4869c1003e48 100755 --- a/sys/contrib/openzfs/.github/workflows/scripts/qemu-5-setup.sh +++ b/sys/contrib/openzfs/.github/workflows/scripts/qemu-5-setup.sh @@ -12,16 +12,26 @@ source /var/tmp/env.txt  # wait for poweroff to succeed  PID=$(pidof /usr/bin/qemu-system-x86_64)  tail --pid=$PID -f /dev/null -sudo virsh undefine openzfs +sudo virsh undefine --nvram openzfs  # cpu pinning  CPUSET=("0,1" "2,3") +# additional options for virt-install +OPTS[0]="" +OPTS[1]="" +  case "$OS" in    freebsd*)      # FreeBSD needs only 6GiB      RAM=6      ;; +  debian13) +    RAM=8 +    # Boot Debian 13 with uefi=on and secureboot=off (ZFS Kernel Module not signed) +    OPTS[0]="--boot" +    OPTS[1]="firmware=efi,firmware.feature0.name=secure-boot,firmware.feature0.enabled=no" +    ;;    *)      # Linux needs more memory, but can be optimized to share it via KSM      RAM=8 @@ -79,7 +89,7 @@ EOF      --network bridge=virbr0,model=$NIC,mac="52:54:00:83:79:0$i" \      --disk $DISK-system,bus=virtio,cache=none,format=$FORMAT,driver.discard=unmap \      --disk $DISK-tests,bus=virtio,cache=none,format=$FORMAT,driver.discard=unmap \ -    --import --noautoconsole >/dev/null +    --import --noautoconsole ${OPTS[0]} ${OPTS[1]}  done  # generate some memory stats @@ -98,19 +108,30 @@ echo '*/5 * * * *  /root/cronjob.sh' > crontab.txt  sudo crontab crontab.txt  rm crontab.txt -# check if the machines are okay -echo "Waiting for vm's to come up...  (${VMs}x CPU=$CPU RAM=$RAM)" -for ((i=1; i<=VMs; i++)); do -  .github/workflows/scripts/qemu-wait-for-vm.sh vm$i -done -echo "All $VMs VMs are up now." -  # Save the VM's serial output (ttyS0) to /var/tmp/console.txt  # - ttyS0 on the VM corresponds to a local /dev/pty/N entry  # - use 'virsh ttyconsole' to lookup the /dev/pty/N entry  for ((i=1; i<=VMs; i++)); do    mkdir -p $RESPATH/vm$i    read "pty" <<< $(sudo virsh ttyconsole vm$i) + +  # Create the file so we can tail it, even if there's no output. +  touch $RESPATH/vm$i/console.txt +    sudo nohup bash -c "cat $pty > $RESPATH/vm$i/console.txt" & + +  # Write all VM boot lines to the console to aid in debugging failed boots. +  # The boot lines from all the VMs will be munged together, so prepend each +  # line with the vm hostname (like 'vm1:'). +  (while IFS=$'\n' read -r line; do echo "vm$i: $line" ; done < <(sudo tail -f $RESPATH/vm$i/console.txt)) & +  done  echo "Console logging for ${VMs}x $OS started." + + +# check if the machines are okay +echo "Waiting for vm's to come up...  (${VMs}x CPU=$CPU RAM=$RAM)" +for ((i=1; i<=VMs; i++)); do +  .github/workflows/scripts/qemu-wait-for-vm.sh vm$i +done +echo "All $VMs VMs are up now." diff --git a/sys/contrib/openzfs/.github/workflows/scripts/qemu-6-tests.sh b/sys/contrib/openzfs/.github/workflows/scripts/qemu-6-tests.sh index 5ab822f4f076..ca6ac77f146d 100755 --- a/sys/contrib/openzfs/.github/workflows/scripts/qemu-6-tests.sh +++ b/sys/contrib/openzfs/.github/workflows/scripts/qemu-6-tests.sh @@ -111,7 +111,7 @@ fi  sudo dmesg -c > dmesg-prerun.txt  mount > mount.txt  df -h > df-prerun.txt -$TDIR/zfs-tests.sh -vK -s 3GB -T $TAGS +$TDIR/zfs-tests.sh -vKO -s 3GB -T $TAGS  RV=$?  df -h > df-postrun.txt  echo $RV > tests-exitcode.txt diff --git a/sys/contrib/openzfs/.github/workflows/zfs-qemu-packages.yml b/sys/contrib/openzfs/.github/workflows/zfs-qemu-packages.yml index 5b5afe746859..d8a95954fe1a 100644 --- a/sys/contrib/openzfs/.github/workflows/zfs-qemu-packages.yml +++ b/sys/contrib/openzfs/.github/workflows/zfs-qemu-packages.yml @@ -32,6 +32,11 @@ on:          options:          - "Build RPMs"          - "Test repo" +      patch_level: +        type: string +        required: false +        default: "" +        description: "(optional) patch level number"        repo_url:          type: string          required: false @@ -78,7 +83,13 @@ jobs:                  mkdir -p /tmp/repo                  ssh zfs@vm0 '$HOME/zfs/.github/workflows/scripts/qemu-test-repo-vm.sh' ${{ github.event.inputs.repo_url }}          else -                .github/workflows/scripts/qemu-4-build.sh --repo --release --dkms --tarball ${{ matrix.os }} +                EXTRA="" +                if [ -n "${{ github.event.inputs.patch_level }}" ] ; then +                        EXTRA="--patch-level ${{ github.event.inputs.patch_level }}" +                fi + +                .github/workflows/scripts/qemu-4-build.sh $EXTRA \ +                        --repo --release --dkms --tarball ${{ matrix.os }}          fi      - name: Prepare artifacts diff --git a/sys/contrib/openzfs/.github/workflows/zfs-qemu.yml b/sys/contrib/openzfs/.github/workflows/zfs-qemu.yml index cda620313189..3b164548f9be 100644 --- a/sys/contrib/openzfs/.github/workflows/zfs-qemu.yml +++ b/sys/contrib/openzfs/.github/workflows/zfs-qemu.yml @@ -29,7 +29,7 @@ jobs:        - name: Generate OS config and CI type          id: os          run: | -          FULL_OS='["almalinux8", "almalinux9", "almalinux10", "centos-stream9", "centos-stream10", "debian11", "debian12", "fedora41", "fedora42", "freebsd13-5r", "freebsd14-3s", "freebsd15-0c", "ubuntu22", "ubuntu24"]' +          FULL_OS='["almalinux8", "almalinux9", "almalinux10", "centos-stream9", "centos-stream10", "debian12", "debian13", "fedora41", "fedora42", "freebsd13-5r", "freebsd14-3s", "freebsd15-0c", "ubuntu22", "ubuntu24"]'            QUICK_OS='["almalinux8", "almalinux9", "almalinux10", "debian12", "fedora42", "freebsd14-3s", "ubuntu24"]'            # determine CI type when running on PR            ci_type="full" @@ -44,7 +44,7 @@ jobs:              os_selection="$FULL_OS"            fi -          if [ ${{ github.event.inputs.fedora_kernel_ver }} != "" ] ; then +          if ${{ github.event.inputs.fedora_kernel_ver != '' }}; then                # They specified a custom kernel version for Fedora.  Use only                # Fedora runners.                os_json=$(echo ${os_selection} | jq -c '[.[] | select(startswith("fedora"))]') @@ -53,9 +53,8 @@ jobs:                os_json=$(echo ${os_selection} | jq -c)            fi -          echo $os_json -          echo "os=$os_json" >> $GITHUB_OUTPUT -          echo "ci_type=$ci_type" >> $GITHUB_OUTPUT +          echo "os=$os_json" | tee -a $GITHUB_OUTPUT +          echo "ci_type=$ci_type" | tee -a $GITHUB_OUTPUT    qemu-vm:      name: qemu-x86 @@ -63,13 +62,13 @@ jobs:      strategy:        fail-fast: false        matrix: -        # rhl:     almalinux8, almalinux9, centos-stream9, fedora41 -        # debian:  debian11, debian12, ubuntu22, ubuntu24 +        # rhl:     almalinux8, almalinux9, centos-stream9, fedora4x +        # debian:  debian12, debian13, ubuntu22, ubuntu24          # misc:    archlinux, tumbleweed          # FreeBSD variants of 2025-06:          # FreeBSD Release: freebsd13-5r, freebsd14-2r, freebsd14-3r          # FreeBSD Stable:  freebsd13-5s, freebsd14-3s -        # FreeBSD Current: freebsd15-0c +        # FreeBSD Current: freebsd15-0c, freebsd16-0c          os: ${{ fromJson(needs.test-config.outputs.test_os) }}      runs-on: ubuntu-24.04      steps: @@ -78,8 +77,12 @@ jobs:          ref: ${{ github.event.pull_request.head.sha }}      - name: Setup QEMU -      timeout-minutes: 10 -      run: .github/workflows/scripts/qemu-1-setup.sh +      timeout-minutes: 20 +      run: | +        # Add a timestamp to each line to debug timeouts +        while IFS=$'\n' read -r line; do +            echo "$(date +'%H:%M:%S') $line" +        done < <(.github/workflows/scripts/qemu-1-setup.sh)      - name: Start build machine        timeout-minutes: 10 | 
