From 345f92961b5f51e84032297a6f72b5a42dda0f4b Mon Sep 17 00:00:00 2001 From: sp98 Date: Mon, 6 Nov 2023 13:03:26 +0530 Subject: [PATCH] ci: filter both 14 and 64 disks in CI github ci runner is allocating both 14 and 64 Gb disks to the setup. Rook CI currently hard codes the lsblk with a 14G filter. This PR updates the filter to use either 14G or 64G disks. Signed-off-by: sp98 --- .github/workflows/canary-integration-test.yml | 28 +++++++++---------- .github/workflows/daily-nightly-jobs.yml | 16 +++++------ .../encryption-pvc-kms-ibm-kp/action.yml | 2 +- .../integration-test-helm-suite.yaml | 2 +- .../workflows/integration-test-mgr-suite.yaml | 2 +- .../integration-test-multi-cluster-suite.yaml | 4 +-- .../integration-test-object-suite.yaml | 2 +- .../integration-test-smoke-suite.yaml | 2 +- .../integration-test-upgrade-suite.yaml | 4 +-- .../integration-tests-on-release.yaml | 14 +++++----- .../workflows/rgw-multisite-test/action.yml | 2 +- tests/scripts/github-action-helper.sh | 6 ++-- 12 files changed, 42 insertions(+), 42 deletions(-) diff --git a/.github/workflows/canary-integration-test.yml b/.github/workflows/canary-integration-test.yml index ba50167b3..8a751fddb 100644 --- a/.github/workflows/canary-integration-test.yml +++ b/.github/workflows/canary-integration-test.yml @@ -283,7 +283,7 @@ jobs: - name: use local disk as OSD run: | tests/scripts/github-action-helper.sh use_local_disk - BLOCK=$(sudo lsblk --paths|awk '/14G/ {print $1}'| head -1) + BLOCK=$(sudo lsblk --paths|awk '/14G/ || /64G/ {print $1}'| head -1) tests/scripts/create-bluestore-partitions.sh --disk "$BLOCK" --wipe-only - name: prepare loop devices for osds @@ -349,7 +349,7 @@ jobs: - name: use local disk as OSD run: | tests/scripts/github-action-helper.sh use_local_disk - BLOCK=$(sudo lsblk --paths|awk '/14G/ {print $1}'| head -1) + BLOCK=$(sudo lsblk --paths|awk '/14G/ || /64G/ {print $1}'| head -1) tests/scripts/create-bluestore-partitions.sh --disk "$BLOCK" --wipe-only - name: deploy cluster @@ -394,7 +394,7 @@ jobs: - name: use local disk as OSD run: | - BLOCK=$(sudo lsblk --paths|awk '/14G/ {print $1}'| head -1) + BLOCK=$(sudo lsblk --paths|awk '/14G/ || /64G/ {print $1}'| head -1) tests/scripts/github-action-helper.sh use_local_disk tests/scripts/create-bluestore-partitions.sh --disk "$BLOCK" --wipe-only @@ -446,7 +446,7 @@ jobs: - name: use local disk as OSD run: | - BLOCK=$(sudo lsblk --paths|awk '/14G/ {print $1}'| head -1) + BLOCK=$(sudo lsblk --paths|awk '/14G/ || /64G/ {print $1}'| head -1) tests/scripts/github-action-helper.sh use_local_disk tests/scripts/create-bluestore-partitions.sh --disk "$BLOCK" --wipe-only @@ -492,13 +492,13 @@ jobs: - name: use local disk as OSD run: | - BLOCK=$(sudo lsblk --paths|awk '/14G/ {print $1}'| head -1) + BLOCK=$(sudo lsblk --paths|awk '/14G/ || /64G/ {print $1}'| head -1) tests/scripts/github-action-helper.sh use_local_disk tests/scripts/create-bluestore-partitions.sh --disk "$BLOCK" --wipe-only - name: create LV on disk run: | - BLOCK=$(sudo lsblk --paths|awk '/14G/ {print $1}'| head -1) + BLOCK=$(sudo lsblk --paths|awk '/14G/ || /64G/ {print $1}'| head -1) tests/scripts/github-action-helper.sh create_LV_on_disk $BLOCK - name: deploy cluster @@ -549,7 +549,7 @@ jobs: - name: create cluster prerequisites run: | - BLOCK=$(sudo lsblk --paths|awk '/14G/ {print $1}'| head -1) + BLOCK=$(sudo lsblk --paths|awk '/14G/ || /64G/ {print $1}'| head -1) tests/scripts/localPathPV.sh "$BLOCK" tests/scripts/loopDevicePV.sh 1 tests/scripts/github-action-helper.sh create_cluster_prerequisites @@ -580,7 +580,7 @@ jobs: kubectl -n rook-ceph logs deploy/rook-ceph-operator tests/scripts/github-action-helper.sh wait_for_cleanup_pod lsblk - BLOCK=$(sudo lsblk --paths|awk '/14G/ {print $1}'| head -1) + BLOCK=$(sudo lsblk --paths|awk '/14G/ || /64G/ {print $1}'| head -1) sudo head --bytes=60 ${BLOCK}1 sudo head --bytes=60 ${BLOCK}2 sudo head --bytes=60 /dev/loop1 @@ -716,7 +716,7 @@ jobs: - name: create cluster prerequisites run: | - tests/scripts/localPathPV.sh $(lsblk --paths|awk '/14G/ {print $1}'| head -1) + tests/scripts/localPathPV.sh $(lsblk --paths|awk '/14G/ || /64G/ {print $1}'| head -1) tests/scripts/github-action-helper.sh create_cluster_prerequisites - name: deploy cluster @@ -742,7 +742,7 @@ jobs: kubectl -n rook-ceph delete cephcluster rook-ceph kubectl -n rook-ceph logs deploy/rook-ceph-operator tests/scripts/github-action-helper.sh wait_for_cleanup_pod - BLOCK=$(sudo lsblk --paths|awk '/14G/ {print $1}'| head -1) + BLOCK=$(sudo lsblk --paths|awk '/14G/ || /64G/ {print $1}'| head -1) sudo head --bytes=60 ${BLOCK}1 sudo head --bytes=60 ${BLOCK}2 sudo lsblk @@ -889,7 +889,7 @@ jobs: - name: create cluster prerequisites run: | - tests/scripts/localPathPV.sh $(lsblk --paths|awk '/14G/ {print $1}'| head -1) + tests/scripts/localPathPV.sh $(lsblk --paths|awk '/14G/ || /64G/ {print $1}'| head -1) tests/scripts/github-action-helper.sh create_cluster_prerequisites - name: deploy vault @@ -970,7 +970,7 @@ jobs: - name: create cluster prerequisites run: | - tests/scripts/localPathPV.sh $(lsblk --paths|awk '/14G/ {print $1}'| head -1) + tests/scripts/localPathPV.sh $(lsblk --paths|awk '/14G/ || /64G/ {print $1}'| head -1) tests/scripts/github-action-helper.sh create_cluster_prerequisites - name: deploy vault @@ -1032,7 +1032,7 @@ jobs: - name: create LV on disk run: | - BLOCK=$(sudo lsblk --paths|awk '/14G/ {print $1}'| head -1) + BLOCK=$(sudo lsblk --paths|awk '/14G/ || /64G/ {print $1}'| head -1) tests/scripts/github-action-helper.sh create_LV_on_disk $BLOCK tests/scripts/localPathPV.sh /dev/test-rook-vg/test-rook-lv @@ -1080,7 +1080,7 @@ jobs: - name: use local disk into two partitions run: | tests/scripts/github-action-helper.sh use_local_disk - BLOCK=$(sudo lsblk --paths|awk '/14G/ {print $1}'| head -1) + BLOCK=$(sudo lsblk --paths|awk '/14G/ || /64G/ {print $1}'| head -1) tests/scripts/create-bluestore-partitions.sh --disk "$BLOCK" --osd-count 2 sudo lsblk diff --git a/.github/workflows/daily-nightly-jobs.yml b/.github/workflows/daily-nightly-jobs.yml index b06c94ed2..b6cf5d1c7 100644 --- a/.github/workflows/daily-nightly-jobs.yml +++ b/.github/workflows/daily-nightly-jobs.yml @@ -125,7 +125,7 @@ jobs: - name: TestCephSmokeSuite run: | - export DEVICE_FILTER=$(lsblk|awk '/14G/ {print $1}'| head -1) + export DEVICE_FILTER=$(lsblk|awk '/14G/ || /64G/ {print $1}'| head -1) SKIP_CLEANUP_POLICY=false CEPH_SUITE_VERSION="pacific-devel" go test -v -timeout 1800s -run TestCephSmokeSuite github.com/rook/rook/tests/integration - name: collect common logs @@ -160,7 +160,7 @@ jobs: - name: TestCephSmokeSuite run: | - export DEVICE_FILTER=$(lsblk|awk '/14G/ {print $1}'| head -1) + export DEVICE_FILTER=$(lsblk|awk '/14G/ || /64G/ {print $1}'| head -1) SKIP_CLEANUP_POLICY=false CEPH_SUITE_VERSION="quincy-devel" go test -v -timeout 1800s -run TestCephSmokeSuite github.com/rook/rook/tests/integration - name: collect common logs @@ -195,7 +195,7 @@ jobs: - name: TestCephSmokeSuite run: | - export DEVICE_FILTER=$(lsblk|awk '/14G/ {print $1}'| head -1) + export DEVICE_FILTER=$(lsblk|awk '/14G/ || /64G/ {print $1}'| head -1) SKIP_CLEANUP_POLICY=false CEPH_SUITE_VERSION="reef-devel" go test -v -timeout 1800s -run TestCephSmokeSuite github.com/rook/rook/tests/integration - name: collect common logs @@ -231,7 +231,7 @@ jobs: - name: TestCephSmokeSuite run: | - export DEVICE_FILTER=$(lsblk|awk '/14G/ {print $1}'| head -1) + export DEVICE_FILTER=$(lsblk|awk '/14G/ || /64G/ {print $1}'| head -1) SKIP_CLEANUP_POLICY=false CEPH_SUITE_VERSION=main go test -v -timeout 1800s -run TestCephSmokeSuite github.com/rook/rook/tests/integration - name: collect common logs @@ -266,7 +266,7 @@ jobs: - name: TestCephObjectSuite run: | - export DEVICE_FILTER=$(lsblk|awk '/14G/ {print $1}'| head -1) + export DEVICE_FILTER=$(lsblk|awk '/14G/ || /64G/ {print $1}'| head -1) SKIP_CLEANUP_POLICY=false CEPH_SUITE_VERSION="pacific-devel" go test -v -timeout 1800s -failfast -run TestCephObjectSuite github.com/rook/rook/tests/integration - name: collect common logs @@ -301,7 +301,7 @@ jobs: - name: TestCephObjectSuite run: | - export DEVICE_FILTER=$(lsblk|awk '/14G/ {print $1}'| head -1) + export DEVICE_FILTER=$(lsblk|awk '/14G/ || /64G/ {print $1}'| head -1) SKIP_CLEANUP_POLICY=false CEPH_SUITE_VERSION=main go test -v -timeout 1800s -failfast -run TestCephObjectSuite github.com/rook/rook/tests/integration - name: collect common logs @@ -336,7 +336,7 @@ jobs: - name: TestCephUpgradeSuite run: | - export DEVICE_FILTER=$(lsblk|awk '/14G/ {print $1}'| head -1) + export DEVICE_FILTER=$(lsblk|awk '/14G/ || /64G/ {print $1}'| head -1) go test -v -timeout 1800s -failfast -run TestCephUpgradeSuite/TestUpgradeCephToPacificDevel github.com/rook/rook/tests/integration - name: collect common logs @@ -371,7 +371,7 @@ jobs: - name: TestCephUpgradeSuite run: | - export DEVICE_FILTER=$(lsblk|awk '/14G/ {print $1}'| head -1) + export DEVICE_FILTER=$(lsblk|awk '/14G/ || /64G/ {print $1}'| head -1) go test -v -timeout 1800s -failfast -run TestCephUpgradeSuite/TestUpgradeCephToQuincyDevel github.com/rook/rook/tests/integration - name: collect common logs diff --git a/.github/workflows/encryption-pvc-kms-ibm-kp/action.yml b/.github/workflows/encryption-pvc-kms-ibm-kp/action.yml index 6d397a4a1..85e47c5b3 100644 --- a/.github/workflows/encryption-pvc-kms-ibm-kp/action.yml +++ b/.github/workflows/encryption-pvc-kms-ibm-kp/action.yml @@ -36,7 +36,7 @@ runs: - name: create cluster prerequisites shell: bash --noprofile --norc -eo pipefail -x {0} run: | - tests/scripts/localPathPV.sh $(lsblk --paths|awk '/14G/ {print $1}'| head -1) + tests/scripts/localPathPV.sh $(lsblk --paths|awk '/14G/ || /64G/ {print $1}'| head -1) tests/scripts/github-action-helper.sh create_cluster_prerequisites - name: deploy cluster diff --git a/.github/workflows/integration-test-helm-suite.yaml b/.github/workflows/integration-test-helm-suite.yaml index ad9aa9fc8..17fe29753 100644 --- a/.github/workflows/integration-test-helm-suite.yaml +++ b/.github/workflows/integration-test-helm-suite.yaml @@ -51,7 +51,7 @@ jobs: tests/scripts/github-action-helper.sh collect_udev_logs_in_background tests/scripts/github-action-helper.sh create_helm_tag tests/scripts/helm.sh up - export DEVICE_FILTER=$(lsblk|awk '/14G/ {print $1}'| head -1) + export DEVICE_FILTER=$(lsblk|awk '/14G/ || /64G/ {print $1}'| head -1) SKIP_TEST_CLEANUP=false SKIP_CLEANUP_POLICY=false go test -v -timeout 1800s -failfast -run CephHelmSuite github.com/rook/rook/tests/integration - name: collect common logs diff --git a/.github/workflows/integration-test-mgr-suite.yaml b/.github/workflows/integration-test-mgr-suite.yaml index a3dfd0dc5..e5e0c1cd3 100644 --- a/.github/workflows/integration-test-mgr-suite.yaml +++ b/.github/workflows/integration-test-mgr-suite.yaml @@ -46,7 +46,7 @@ jobs: - name: TestCephMgrSuite run: | tests/scripts/github-action-helper.sh collect_udev_logs_in_background - export DEVICE_FILTER=$(lsblk|awk '/14G/ {print $1}'| head -1) + export DEVICE_FILTER=$(lsblk|awk '/14G/ || /64G/ {print $1}'| head -1) go test -v -timeout 1800s -failfast -run CephMgrSuite github.com/rook/rook/tests/integration - name: collect common logs diff --git a/.github/workflows/integration-test-multi-cluster-suite.yaml b/.github/workflows/integration-test-multi-cluster-suite.yaml index 9f5e376ad..14f406427 100644 --- a/.github/workflows/integration-test-multi-cluster-suite.yaml +++ b/.github/workflows/integration-test-multi-cluster-suite.yaml @@ -46,8 +46,8 @@ jobs: - name: TestCephMultiClusterDeploySuite run: | tests/scripts/github-action-helper.sh collect_udev_logs_in_background - export TEST_SCRATCH_DEVICE=$(sudo lsblk --paths|awk '/14G/ {print $1}'| head -1)1 - export DEVICE_FILTER=$(lsblk|awk '/14G/ {print $1}'| head -1) + export TEST_SCRATCH_DEVICE=$(sudo lsblk --paths|awk '/14G/ || /64G/ {print $1}'| head -1)1 + export DEVICE_FILTER=$(lsblk|awk '/14G/ || /64G/ {print $1}'| head -1) go test -v -timeout 1800s -failfast -run CephMultiClusterDeploySuite github.com/rook/rook/tests/integration - name: collect common logs diff --git a/.github/workflows/integration-test-object-suite.yaml b/.github/workflows/integration-test-object-suite.yaml index 4970ef72c..a729b8154 100644 --- a/.github/workflows/integration-test-object-suite.yaml +++ b/.github/workflows/integration-test-object-suite.yaml @@ -46,7 +46,7 @@ jobs: - name: TestCephObjectSuite run: | tests/scripts/github-action-helper.sh collect_udev_logs_in_background - export DEVICE_FILTER=$(lsblk|awk '/14G/ {print $1}'| head -1) + export DEVICE_FILTER=$(lsblk|awk '/14G/ || /64G/ {print $1}'| head -1) SKIP_CLEANUP_POLICY=false go test -v -timeout 2400s -failfast -run CephObjectSuite github.com/rook/rook/tests/integration - name: collect common logs diff --git a/.github/workflows/integration-test-smoke-suite.yaml b/.github/workflows/integration-test-smoke-suite.yaml index e8121cf5d..eef5d8e08 100644 --- a/.github/workflows/integration-test-smoke-suite.yaml +++ b/.github/workflows/integration-test-smoke-suite.yaml @@ -46,7 +46,7 @@ jobs: - name: TestCephSmokeSuite run: | tests/scripts/github-action-helper.sh collect_udev_logs_in_background - export DEVICE_FILTER=$(lsblk|awk '/14G/ {print $1}'| head -1) + export DEVICE_FILTER=$(lsblk|awk '/14G/ || /64G/ {print $1}'| head -1) SKIP_CLEANUP_POLICY=false go test -v -timeout 1800s -failfast -run CephSmokeSuite github.com/rook/rook/tests/integration - name: collect common logs diff --git a/.github/workflows/integration-test-upgrade-suite.yaml b/.github/workflows/integration-test-upgrade-suite.yaml index ed71a2945..6ea0110ba 100644 --- a/.github/workflows/integration-test-upgrade-suite.yaml +++ b/.github/workflows/integration-test-upgrade-suite.yaml @@ -46,7 +46,7 @@ jobs: - name: TestCephUpgradeSuite run: | tests/scripts/github-action-helper.sh collect_udev_logs_in_background - export DEVICE_FILTER=$(lsblk|awk '/14G/ {print $1}'| head -1) + export DEVICE_FILTER=$(lsblk|awk '/14G/ || /64G/ {print $1}'| head -1) go test -v -timeout 2400s -failfast -run CephUpgradeSuite/TestUpgradeRook github.com/rook/rook/tests/integration - name: collect common logs @@ -94,7 +94,7 @@ jobs: tests/scripts/helm.sh up tests/scripts/github-action-helper.sh collect_udev_logs_in_background - export DEVICE_FILTER=$(lsblk|awk '/14G/ {print $1}'| head -1) + export DEVICE_FILTER=$(lsblk|awk '/14G/ || /64G/ {print $1}'| head -1) go test -v -timeout 1800s -failfast -run CephUpgradeSuite/TestUpgradeHelm github.com/rook/rook/tests/integration - name: collect common logs diff --git a/.github/workflows/integration-tests-on-release.yaml b/.github/workflows/integration-tests-on-release.yaml index f9dacc9ce..b1be3ab30 100644 --- a/.github/workflows/integration-tests-on-release.yaml +++ b/.github/workflows/integration-tests-on-release.yaml @@ -36,7 +36,7 @@ jobs: tests/scripts/github-action-helper.sh collect_udev_logs_in_background tests/scripts/github-action-helper.sh create_helm_tag tests/scripts/helm.sh up - export DEVICE_FILTER=$(lsblk|awk '/14G/ {print $1}'| head -1) + export DEVICE_FILTER=$(lsblk|awk '/14G/ || /64G/ {print $1}'| head -1) SKIP_TEST_CLEANUP=false SKIP_CLEANUP_POLICY=false go test -v -timeout 1800s -run CephHelmSuite github.com/rook/rook/tests/integration - name: collect common logs @@ -75,8 +75,8 @@ jobs: - name: TestCephMultiClusterDeploySuite run: | tests/scripts/github-action-helper.sh collect_udev_logs_in_background - export TEST_SCRATCH_DEVICE=$(sudo lsblk --paths|awk '/14G/ {print $1}'| head -1)1 - export DEVICE_FILTER=$(lsblk|awk '/14G/ {print $1}'| head -1) + export TEST_SCRATCH_DEVICE=$(sudo lsblk --paths|awk '/14G/ || /64G/ {print $1}'| head -1)1 + export DEVICE_FILTER=$(lsblk|awk '/14G/ || /64G/ {print $1}'| head -1) go test -v -timeout 1800s -run CephMultiClusterDeploySuite github.com/rook/rook/tests/integration - name: collect common logs @@ -115,7 +115,7 @@ jobs: - name: TestCephSmokeSuite run: | tests/scripts/github-action-helper.sh collect_udev_logs_in_background - export DEVICE_FILTER=$(lsblk|awk '/14G/ {print $1}'| head -1) + export DEVICE_FILTER=$(lsblk|awk '/14G/ || /64G/ {print $1}'| head -1) SKIP_CLEANUP_POLICY=false go test -v -timeout 1800s -run CephSmokeSuite github.com/rook/rook/tests/integration - name: collect common logs @@ -154,7 +154,7 @@ jobs: - name: TestCephUpgradeSuite run: | tests/scripts/github-action-helper.sh collect_udev_logs_in_background - export DEVICE_FILTER=$(lsblk|awk '/14G/ {print $1}'| head -1) + export DEVICE_FILTER=$(lsblk|awk '/14G/ || /64G/ {print $1}'| head -1) go test -v -timeout 2400s -run CephUpgradeSuite/TestUpgradeRook github.com/rook/rook/tests/integration - name: collect common logs @@ -196,7 +196,7 @@ jobs: tests/scripts/helm.sh up tests/scripts/github-action-helper.sh collect_udev_logs_in_background - export DEVICE_FILTER=$(lsblk|awk '/14G/ {print $1}'| head -1) + export DEVICE_FILTER=$(lsblk|awk '/14G/ || /64G/ {print $1}'| head -1) go test -v -timeout 1800s -run CephUpgradeSuite/TestUpgradeHelm github.com/rook/rook/tests/integration - name: collect common logs @@ -235,7 +235,7 @@ jobs: - name: TestCephObjectSuite run: | tests/scripts/github-action-helper.sh collect_udev_logs_in_background - export DEVICE_FILTER=$(lsblk|awk '/14G/ {print $1}'| head -1) + export DEVICE_FILTER=$(lsblk|awk '/14G/ || /64G/ {print $1}'| head -1) SKIP_CLEANUP_POLICY=false go test -v -timeout 2400s -failfast -run CephObjectSuite github.com/rook/rook/tests/integration - name: collect common logs diff --git a/.github/workflows/rgw-multisite-test/action.yml b/.github/workflows/rgw-multisite-test/action.yml index 2de4db5f7..033ac3ab4 100644 --- a/.github/workflows/rgw-multisite-test/action.yml +++ b/.github/workflows/rgw-multisite-test/action.yml @@ -24,7 +24,7 @@ runs: - name: use local disk into two partitions shell: bash --noprofile --norc -eo pipefail -x {0} run: | - BLOCK=$(sudo lsblk --paths|awk '/14G/ {print $1}'| head -1) + BLOCK=$(sudo lsblk --paths|awk '/14G/ || /64G/ {print $1}'| head -1) tests/scripts/github-action-helper.sh use_local_disk tests/scripts/create-bluestore-partitions.sh --disk "$BLOCK" --osd-count 2 sudo lsblk diff --git a/tests/scripts/github-action-helper.sh b/tests/scripts/github-action-helper.sh index b5dbd1f45..664d47900 100755 --- a/tests/scripts/github-action-helper.sh +++ b/tests/scripts/github-action-helper.sh @@ -19,7 +19,7 @@ set -xeEo pipefail ############# # VARIABLES # ############# -: "${BLOCK:=$(sudo lsblk --paths | awk '/14G/ {print $1}' | head -1)}" +: "${BLOCK:=$(sudo lsblk --paths | awk '/14G/ || /64G/ {print $1}' | head -1)}" NETWORK_ERROR="connection reset by peer" SERVICE_UNAVAILABLE_ERROR="Service Unavailable" INTERNAL_ERROR="INTERNAL_ERROR" @@ -396,7 +396,7 @@ function create_LV_on_disk() { } function deploy_first_rook_cluster() { - BLOCK=$(sudo lsblk | awk '/14G/ {print $1}' | head -1) + BLOCK=$(sudo lsblk | awk '/14G/ || /64G/ {print $1}' | head -1) create_cluster_prerequisites cd deploy/examples/ @@ -409,7 +409,7 @@ function deploy_first_rook_cluster() { } function deploy_second_rook_cluster() { - BLOCK=$(sudo lsblk | awk '/14G/ {print $1}' | head -1) + BLOCK=$(sudo lsblk | awk '/14G/ || /64G/ {print $1}' | head -1) cd deploy/examples/ NAMESPACE=rook-ceph-secondary envsubst