diff --git a/.github/workflows/canary-integration-test.yml b/.github/workflows/canary-integration-test.yml index a122002a1a61e..33a23d5ddac8b 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 --dry-run=True; do echo 'waiting for script to succeed' && sleep 1; done" - name: run external script create-external-cluster-resources.py unit tests run: | diff --git a/deploy/examples/create-external-cluster-resources.py b/deploy/examples/create-external-cluster-resources.py index 3c8ef5223ecba..b4110064ed7b7 100644 --- a/deploy/examples/create-external-cluster-resources.py +++ b/deploy/examples/create-external-cluster-resources.py @@ -214,7 +214,7 @@ def validate_rgw_endpoint_tls_cert(self): return contents.rstrip() def _check_conflicting_options(self): - if not self._arg_parser.upgrade and not self._arg_parser.rbd_data_pool_name: + if not self._arg_parser.upgrade and not self._arg_parser.rbd_data_pool_name and not self._arg_parser.dry_run: raise ExecutionFailureException( "Either '--upgrade' or '--rbd-data-pool-name ' should be specified") if self._arg_parser.upgrade and self._arg_parser.rbd_data_pool_name: @@ -752,7 +752,7 @@ def _gen_output_map(self): pools_to_validate.extend(rgw_pool_to_validate) for pool in pools_to_validate: - if not self.cluster.pool_exists(pool): + if not self.cluster.pool_exists(pool) and not self._arg_parser.dry_run: raise ExecutionFailureException( "The provided pool, '{}', does not exist".format(pool)) self._excluded_keys.add('CLUSTER_NAME')