Skip to content

Commit 9cb92aa

Browse files
authored
Merge pull request #402 from ShravaniVangur/ci-changes
ci: Minor fixes in CI
2 parents e894ee0 + 29f6d87 commit 9cb92aa

2 files changed

Lines changed: 14 additions & 4 deletions

File tree

.github/workflows/go-test-config/action.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ runs:
178178
kubectl -n ${{ inputs.cluster-ns }} delete cephcluster my-cluster --timeout 3s --wait=false
179179
180180
kubectl rook-ceph ${NS_OPT} restore-deleted cephclusters
181-
tests/github-action-helper.sh wait_for_crd_to_be_ready ${{ inputs.cluster-ns }}
181+
tests/github-action-helper.sh wait_for_ceph_cluster_to_be_ready ${{ inputs.cluster-ns }}
182182
183183
- name: Restore CRD with CRName
184184
shell: bash --noprofile --norc -eo pipefail -x {0}
@@ -187,7 +187,7 @@ runs:
187187
kubectl -n ${{ inputs.cluster-ns }} delete cephcluster my-cluster --timeout 3s --wait=false
188188
189189
kubectl rook-ceph ${NS_OPT} restore-deleted cephclusters my-cluster
190-
tests/github-action-helper.sh wait_for_crd_to_be_ready ${{ inputs.cluster-ns }}
190+
tests/github-action-helper.sh wait_for_ceph_cluster_to_be_ready ${{ inputs.cluster-ns }}
191191
192192
- name: Show Cluster State
193193
shell: bash --noprofile --norc -eo pipefail -x {0}

tests/github-action-helper.sh

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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!"
254265
EOF
255-
timeout_command_exit_code
256266
}
257267

258268
wait_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

Comments
 (0)