diff --git a/.github/workflows/ci-for-default-ns.yaml b/.github/workflows/ci-for-default-ns.yaml index fba98fad..ced19693 100644 --- a/.github/workflows/ci-for-default-ns.yaml +++ b/.github/workflows/ci-for-default-ns.yaml @@ -56,9 +56,11 @@ jobs: kubectl rook_ceph ceph status kubectl rook_ceph ceph status -f json kubectl rook_ceph ceph status --format json-pretty + POD=$(kubectl -n rook-ceph get pod -l app=rook-ceph-operator -o jsonpath="{.items[0].metadata.name}") kubectl rook_ceph operator restart # let's wait for operator pod to be restart + kubectl -n rook-ceph wait --for=delete pod/$POD --timeout=100s tests/github-action-helper.sh wait_for_operator_pod_to_be_ready_state_default kubectl rook_ceph operator set ROOK_LOG_LEVEL DEBUG kubectl rook_ceph --context=$(kubectl config current-context) mons diff --git a/.github/workflows/ci-for-diff-ns.yaml b/.github/workflows/ci-for-diff-ns.yaml index 9fbd6b66..0b65e9bd 100644 --- a/.github/workflows/ci-for-diff-ns.yaml +++ b/.github/workflows/ci-for-diff-ns.yaml @@ -33,9 +33,11 @@ jobs: kubectl rook_ceph -o test-operator -n test-cluster ceph status kubectl rook_ceph -o test-operator -n test-cluster ceph status -f json kubectl rook_ceph -o test-operator -n test-cluster ceph status --format json-pretty + POD=$(kubectl -n test-operator get pod -l app=rook-ceph-operator -o jsonpath="{.items[0].metadata.name}") kubectl rook_ceph -o test-operator -n test-cluster operator restart # let's wait for operator pod to be restart + kubectl -n test-operator wait --for=delete pod/$POD --timeout=100s tests/github-action-helper.sh wait_for_operator_pod_to_be_ready_state_custom kubectl rook_ceph -o test-operator -n test-cluster operator set ROOK_LOG_LEVEL DEBUG kubectl rook_ceph -o test-operator -n test-cluster --context=$(kubectl config current-context) mons diff --git a/tests/github-action-helper.sh b/tests/github-action-helper.sh index 543d09c8..3a8213a8 100755 --- a/tests/github-action-helper.sh +++ b/tests/github-action-helper.sh @@ -85,7 +85,7 @@ EOF } wait_for_operator_pod_to_be_ready_state_default() { - timeout 10 bash <<-'EOF' + timeout 100 bash <<-'EOF' until [ $(kubectl get pod -l app=rook-ceph-operator -n rook-ceph -o jsonpath='{.items[*].metadata.name}' -o custom-columns=READY:status.containerStatuses[*].ready | grep -c true) -eq 1 ]; do echo "waiting for the operator to be in ready state" sleep 1 @@ -94,7 +94,7 @@ EOF } wait_for_operator_pod_to_be_ready_state_custom() { - timeout 10 bash <<-'EOF' + timeout 100 bash <<-'EOF' until [ $(kubectl get pod -l app=rook-ceph-operator -n test-operator -o jsonpath='{.items[*].metadata.name}' -o custom-columns=READY:status.containerStatuses[*].ready | grep -c true) -eq 1 ]; do echo "waiting for the operator to be in ready state" sleep 1