From a7f58ad4f23d47dc0030e2110957895afd1de085 Mon Sep 17 00:00:00 2001 From: subhamkrai Date: Thu, 2 Dec 2021 12:08:44 +0530 Subject: [PATCH] test: this commit is only for testing This commit is only for testing Signed-off-by: subhamkrai --- .github/workflows/canary-integration-test.yml | 4 ++-- deploy/examples/create-external-cluster-resources.py | 9 +++++---- deploy/examples/pool-ec.yaml | 4 ++-- tests/scripts/github-action-helper.sh | 1 + 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/canary-integration-test.yml b/.github/workflows/canary-integration-test.yml index a72f31b84ffbe..e04bb153187f0 100644 --- a/.github/workflows/canary-integration-test.yml +++ b/.github/workflows/canary-integration-test.yml @@ -57,7 +57,7 @@ jobs: kubectl -n rook-ceph exec $toolbox -- mkdir -p /etc/ceph/test-data kubectl -n rook-ceph cp tests/ceph-status-out $toolbox:/etc/ceph/test-data/ kubectl -n rook-ceph cp deploy/examples/create-external-cluster-resources.py $toolbox:/etc/ceph - timeout 10 sh -c "until kubectl -n rook-ceph exec $toolbox -- python3 /etc/ceph/create-external-cluster-resources.py --rbd-data-pool-name replicapool; do echo 'waiting for script to succeed' && sleep 1; done" + timeout 10 sh -c "until kubectl -n rook-ceph exec $toolbox -- python3 /etc/ceph/create-external-cluster-resources.py --rbd-data-pool-name=replicated-metadata-pool --rbd-metadata-ec-pool-name=ec-data-pool; do echo 'waiting for script to succeed' && sleep 1; done" - name: run external script create-external-cluster-resources.py unit tests run: | @@ -91,7 +91,7 @@ jobs: name: canary - name: setup tmate session for debugging when event is PR - if: failure() && github.event_name == 'pull_request' + if: always() && github.event_name == 'pull_request' uses: mxschmitt/action-tmate@v3 timeout-minutes: 60 diff --git a/deploy/examples/create-external-cluster-resources.py b/deploy/examples/create-external-cluster-resources.py index 2272cf8afe26a..2c958b3d909d9 100644 --- a/deploy/examples/create-external-cluster-resources.py +++ b/deploy/examples/create-external-cluster-resources.py @@ -218,7 +218,7 @@ def validate_rgw_metadata_ec_pool_name(self): ) cmd_json = { - "prefix": "osd pool ls detail" + "prefix": "osd dump", "format": "json" } ret_val, json_out, err_msg = self._common_cmd_json_gen(cmd_json) if ret_val != 0 or len(json_out) == 0: @@ -228,12 +228,13 @@ def validate_rgw_metadata_ec_pool_name(self): 0 else self.EMPTY_OUTPUT_LIST) ) metadata_pool_exist, pools_exist = False, False - for keys in json_out: + + for key in json_out['pools']: # if erasure_code_profile is empty and pool name exists then it replica pool - if keys['erasure_code_profile'] == "" and rbd_metadata_ec_pool_name in keys['pool_name']: + if key['erasure_code_profile'] == "" and rbd_metadata_ec_pool_name in key['pool_name']: metadata_pool_exist = True # if erasure_code_profile is not empty and pool name exists then it is ec pool - if keys['erasure_code_profile'] and keys['pool_name'] == rbd_pool_name: + if key['erasure_code_profile'] and key['pool_name'] == rbd_pool_name: pool_exist = True if not metadata_pool_exist: diff --git a/deploy/examples/pool-ec.yaml b/deploy/examples/pool-ec.yaml index d98f964e52a56..22eaee237d2c2 100644 --- a/deploy/examples/pool-ec.yaml +++ b/deploy/examples/pool-ec.yaml @@ -10,11 +10,11 @@ metadata: namespace: rook-ceph # namespace:cluster spec: # The failure domain will spread the replicas of the data across different failure zones - failureDomain: osd + failureDomain: host # Make sure you have enough OSDs to support the replica size or sum of the erasure coding and data chunks. # This is the minimal example that requires only 3 OSDs. erasureCoded: - dataChunks: 2 + dataChunks: 1 codingChunks: 1 # Set any property on a given pool # see https://docs.ceph.com/docs/master/rados/operations/pools/#set-pool-values diff --git a/tests/scripts/github-action-helper.sh b/tests/scripts/github-action-helper.sh index 25e8ede57fabc..f114d02ad035f 100755 --- a/tests/scripts/github-action-helper.sh +++ b/tests/scripts/github-action-helper.sh @@ -212,6 +212,7 @@ function deploy_cluster() { kubectl create -f cluster-test.yaml kubectl create -f object-test.yaml kubectl create -f pool-test.yaml + kubectl create -f csi/rbd/storageclass-ec.yaml kubectl create -f filesystem-test.yaml kubectl create -f rbdmirror.yaml kubectl create -f filesystem-mirror.yaml