From 05ac99c0c011d8ecb4f5041e6b868eeba5cbd96b Mon Sep 17 00:00:00 2001 From: Xinliang Liu Date: Thu, 26 Sep 2024 10:34:35 +0000 Subject: [PATCH] ci: fix canary-arm64 job Fix OSD isn't up. As sdb device might change to vdb in the runner, let find_extra_block_dev() exclude the nbd devices and find the proper extra device for OSD. Clean up the nbd devices after the test job is running. Fix logs artifact upload twice and collect logs before clean up. Signed-off-by: Xinliang Liu --- .github/workflows/daily-nightly-jobs.yml | 22 +++++++--------------- tests/scripts/github-action-helper.sh | 2 +- 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/.github/workflows/daily-nightly-jobs.yml b/.github/workflows/daily-nightly-jobs.yml index ba0e412c5..65fd14ccb 100644 --- a/.github/workflows/daily-nightly-jobs.yml +++ b/.github/workflows/daily-nightly-jobs.yml @@ -16,8 +16,6 @@ jobs: canary-arm64: runs-on: [self-hosted, ubuntu-20.04-arm64, ARM64] if: github.repository == 'rook/rook' - env: - BLOCK: /dev/sdb steps: - name: checkout @@ -91,6 +89,12 @@ jobs: - name: wait for ceph to be ready run: tests/scripts/github-action-helper.sh wait_for_ceph_to_be_ready "mon,mgr,osd,mds,rgw,rbd_mirror,fs_mirror" 1 + - name: collect common logs + if: always() + uses: ./.github/workflows/collect-logs + with: + name: canary-arm64 + - name: teardown minikube, docker and kubectl if: always() run: | @@ -100,24 +104,12 @@ jobs: sudo service docker stop sudo rm -rf /usr/local/bin/minikube sudo rm -rf /usr/local/bin/kubectl + sudo modprobe -r nbd - name: remove /usr/bin/yq if: always() run: sudo rm -rf /usr/bin/yq - - name: collect common logs - if: always() - uses: ./.github/workflows/collect-logs - with: - name: canary-arm64 - - - name: upload canary test result - uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0 - if: always() - with: - name: canary-arm64 - path: test - smoke-suite-quincy-devel: if: github.repository == 'rook/rook' runs-on: ubuntu-22.04 diff --git a/tests/scripts/github-action-helper.sh b/tests/scripts/github-action-helper.sh index 277a6f5f5..0756a0f77 100755 --- a/tests/scripts/github-action-helper.sh +++ b/tests/scripts/github-action-helper.sh @@ -30,7 +30,7 @@ function find_extra_block_dev() { boot_dev="$(sudo lsblk --noheading --list --output MOUNTPOINT,PKNAME | grep boot | awk '{print $2}')" echo " == find_extra_block_dev(): boot_dev='$boot_dev'" >/dev/stderr # debug in case of future errors # --nodeps ignores partitions - extra_dev="$(sudo lsblk --noheading --list --nodeps --output KNAME | grep -v loop | grep -v "$boot_dev" | head -1)" + extra_dev="$(sudo lsblk --noheading --list --nodeps --output KNAME | egrep -v "($boot_dev|loop|nbd)" | head -1)" echo " == find_extra_block_dev(): extra_dev='$extra_dev'" >/dev/stderr # debug in case of future errors echo "$extra_dev" # output of function }