From aa82991605989657ec962f5f130a0d3e85279799 Mon Sep 17 00:00:00 2001 From: parth-gr Date: Mon, 13 Jun 2022 19:12:42 +0530 Subject: [PATCH] ci: remove the seprate quincy test A seprate version test was introduce for rgw-endpoint but from now as we are using quincy in master so we can remove it and update the current canary test. Signed-off-by: parth-gr (cherry picked from commit dc0447a88299e201995f4c29c7b8508cd4061849) Signed-off-by: parth-gr --- .github/workflows/canary-integration-test.yml | 83 ++++--------------- 1 file changed, 18 insertions(+), 65 deletions(-) diff --git a/.github/workflows/canary-integration-test.yml b/.github/workflows/canary-integration-test.yml index 95b996fa2..ac366b0a0 100644 --- a/.github/workflows/canary-integration-test.yml +++ b/.github/workflows/canary-integration-test.yml @@ -130,6 +130,24 @@ jobs: # print ugraded client auth kubectl -n rook-ceph exec $toolbox -- ceph auth get client.csi-rbd-node-rookstorage-replicapool + - name: validate-rgw-endpoint + run: | + rgw_endpoint=$(kubectl get service -n rook-ceph | awk '/rgw/ {print $3":80"}') + toolbox=$(kubectl get pod -l app=rook-ceph-tools -n rook-ceph -o jsonpath='{.items[*].metadata.name}') + # pass the valid rgw-endpoint of same ceph cluster + timeout 15 sh -c "until kubectl -n rook-ceph exec $toolbox -- python3 /etc/ceph/create-external-cluster-resources.py --rbd-data-pool-name replicapool --rgw-endpoint $rgw_endpoint; do sleep 1 && echo 'waiting for the rgw endpoint to be validated'; done" + # pass the invalid rgw-endpoint of different ceph cluster + if output=$(timeout 15 sh -c "until kubectl -n rook-ceph exec $toolbox -- python3 /etc/ceph/create-external-cluster-resources.py --rbd-data-pool-name replicapool --rgw-endpoint 10.108.96.128:80; do sleep 1 && echo 'waiting for the rgw endpoint to be validated'; done"); then + echo "unexpectedly succeeded after passing the wrong rgw-endpoint: $output" + exit 1 + else + echo "validation failed because wrong endpoint was provided" + fi + # pass the valid rgw-endpoint of same ceph cluster with --rgw-tls-cert-path + timeout 15 sh -c "until kubectl -n rook-ceph exec $toolbox -- python3 /etc/ceph/create-external-cluster-resources.py --rbd-data-pool-name replicapool --rgw-endpoint $rgw_endpoint --rgw-tls-cert-path my-cert; do sleep 1 && echo 'waiting for the rgw endpoint to be validated'; done" + # pass the valid rgw-endpoint of same ceph cluster with --rgw-skip-tls + timeout 15 sh -c "until kubectl -n rook-ceph exec $toolbox -- python3 /etc/ceph/create-external-cluster-resources.py --rbd-data-pool-name replicapool --rgw-endpoint $rgw_endpoint --rgw-skip-tls true; do sleep 1 && echo 'waiting for the rgw endpoint to be validated'; done" + - name: check-ownerreferences run: tests/scripts/github-action-helper.sh check_ownerreferences @@ -160,71 +178,6 @@ jobs: uses: mxschmitt/action-tmate@v3 timeout-minutes: 60 - external-rgw-quincy-test: - runs-on: ubuntu-18.04 - if: "!contains(github.event.pull_request.labels.*.name, 'skip-ci')" - steps: - - name: checkout - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - - name: setup cluster resources - uses: ./.github/workflows/setup-cluster-resources - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - env: - CEPH_VERSION: v17.2.0-20220420 - - - name: validate-yaml - run: tests/scripts/github-action-helper.sh validate_yaml - - - name: use local disk and create partitions for osds - run: | - tests/scripts/github-action-helper.sh use_local_disk - tests/scripts/github-action-helper.sh create_partitions_for_osds - - - name: deploy cluster - run: tests/scripts/github-action-helper.sh deploy_cluster - - - name: wait for prepare pod - run: tests/scripts/github-action-helper.sh wait_for_prepare_pod - - - name: wait for ceph to be ready - run: tests/scripts/github-action-helper.sh wait_for_ceph_to_be_ready all 2 - - - name: validate-rgw-endpoint - run: | - rgw_endpoint=$(kubectl get service -n rook-ceph | awk '/rgw/ {print $3":80"}') - toolbox=$(kubectl get pod -l app=rook-ceph-tools -n rook-ceph -o jsonpath='{.items[*].metadata.name}') - timeout 15 sh -c "until kubectl -n rook-ceph exec $toolbox -- ceph mgr dump -f json|jq --raw-output .active_addr|grep -Eosq \"(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\" ; do sleep 1 && echo 'waiting for the manager IP to be available'; done" - mgr_raw=$(kubectl -n rook-ceph exec $toolbox -- ceph mgr dump -f json|jq --raw-output .active_addr) - timeout 60 sh -c "until kubectl -n rook-ceph exec $toolbox -- curl --silent --show-error ${mgr_raw%%:*}:9283; do echo 'waiting for mgr prometheus exporter to be ready' && sleep 1; done" - kubectl -n rook-ceph cp deploy/examples/create-external-cluster-resources.py $toolbox:/etc/ceph - # pass the valid rgw-endpoint of same ceph cluster - timeout 15 sh -c "until kubectl -n rook-ceph exec $toolbox -- python3 /etc/ceph/create-external-cluster-resources.py --rbd-data-pool-name replicapool --rgw-endpoint $rgw_endpoint; do sleep 1 && echo 'waiting for the rgw endpoint to be validated'; done" - # pass the invalid rgw-endpoint of different ceph cluster - if output=$(timeout 15 sh -c "until kubectl -n rook-ceph exec $toolbox -- python3 /etc/ceph/create-external-cluster-resources.py --rbd-data-pool-name replicapool --rgw-endpoint 10.108.96.128:80; do sleep 1 && echo 'waiting for the rgw endpoint to be validated'; done"); then - echo $output - else - echo "validation failed because wrong endpoint was provided" - fi - # pass the valid rgw-endpoint of same ceph cluster with --rgw-tls-cert-path - timeout 15 sh -c "until kubectl -n rook-ceph exec $toolbox -- python3 /etc/ceph/create-external-cluster-resources.py --rbd-data-pool-name replicapool --rgw-endpoint $rgw_endpoint --rgw-tls-cert-path my-cert; do sleep 1 && echo 'waiting for the rgw endpoint to be validated'; done" - # pass the valid rgw-endpoint of same ceph cluster with --rgw-skip-tls - timeout 15 sh -c "until kubectl -n rook-ceph exec $toolbox -- python3 /etc/ceph/create-external-cluster-resources.py --rbd-data-pool-name replicapool --rgw-endpoint $rgw_endpoint --rgw-skip-tls true; do sleep 1 && echo 'waiting for the rgw endpoint to be validated'; done" - - - name: collect common logs - if: always() - uses: ./.github/workflows/collect-logs - with: - name: external-rgw-quincy-test - - - name: setup tmate session for debugging when event is PR - if: failure() && github.event_name == 'pull_request' - uses: mxschmitt/action-tmate@v3 - timeout-minutes: 60 - raw-disk: runs-on: ubuntu-18.04 if: "!contains(github.event.pull_request.labels.*.name, 'skip-ci')"