@@ -139,6 +139,16 @@ deploy_csi_driver_rados_namespace() {
139139 kubectl create -f cephblockpoolradosnamespace_a.yaml
140140 wait_for_cephblockpoolradosnamespace_ready_state " rook-ceph" " namespace-a" 60
141141
142+ # Restart the rook-ceph-operator pod to ensure it picks up new resources
143+ operator_pod=$( kubectl -n rook-ceph get pods -l app=rook-ceph-operator -o jsonpath=' {.items[0].metadata.name}' )
144+ if [ -n " $operator_pod " ]; then
145+ kubectl -n rook-ceph delete pod " $operator_pod "
146+ echo " rook-ceph-operator pod $operator_pod deleted. Waiting for it to restart..."
147+ else
148+ echo " rook-ceph-operator pod not found, skipping restart."
149+ fi
150+ wait_for_operator_pod_to_be_ready_state rook-ceph
151+
142152 curl https://raw.githubusercontent.com/rook/rook/refs/heads/master/deploy/examples/radosnamespace.yaml -o cephblockpoolradosnamespace_b.yaml
143153 sed -i " s|blockPoolName: replicapool|blockPoolName: blockpool-rados-ns |g" cephblockpoolradosnamespace_b.yaml
144154 sed -i " s|name: namespace-a|name: namespace-b |g" cephblockpoolradosnamespace_b.yaml
@@ -251,8 +261,8 @@ wait_for_operator_pod_to_be_ready_state() {
251261 echo "waiting for the operator to be in ready state"
252262 sleep 1
253263 done
264+ echo "rook-ceph-operator pod is in ready state!"
254265EOF
255- timeout_command_exit_code
256266}
257267
258268wait_for_three_mons () {
@@ -274,7 +284,7 @@ wait_for_deployment_to_be_running() {
274284 kubectl -n " $namespace " wait deployment " $deployment " --for condition=Available=True --timeout=90s
275285}
276286
277- wait_for_crd_to_be_ready () {
287+ wait_for_ceph_cluster_to_be_ready () {
278288 export cluster_ns=$1
279289 timeout 300 bash << -'EOF '
280290 set -x
0 commit comments