diff --git a/.github/workflows/go-test.yaml b/.github/workflows/go-test.yaml index 9a2ffb19..1346dfc9 100644 --- a/.github/workflows/go-test.yaml +++ b/.github/workflows/go-test.yaml @@ -323,7 +323,10 @@ jobs: set -ex kubectl rook-ceph --operator-namespace test-operator -n test-cluster destroy-cluster sleep 1 - kubectl get deployments -n test-cluster --no-headers| wc -l | (read n && [ $n -le 1 ] || { echo "the crs could not be deleted"; kubectl get all -n test-cluster; exit 1;}) + kubectl -n test-cluster get deployments --no-headers| wc -l | (read n && [ $n -le 1 ] || { echo "the crs could not be deleted"; kubectl get all -n test-cluster; exit 1;}) + sleep 5 + node_name=$(kubectl get node --no-headers | awk '{print $1}') + kubectl -n test-cluster get pod -l job-name=cluster-cleanup-job-${node_name} --no-headers | grep Completed || { echo "cluster cleanup job not found or failed"; kubectl get all -n test-cluster; exit 1;} - name: collect common logs if: always() diff --git a/pkg/crds/crds.go b/pkg/crds/crds.go index 5cf066b6..3f61dee3 100644 --- a/pkg/crds/crds.go +++ b/pkg/crds/crds.go @@ -166,6 +166,8 @@ func updatingFinalizers(ctx context.Context, clientsets k8sutil.ClientsetsInterf if err != nil { return err } + logging.Info("Added cleanup policy to the cephcluster CR %q", resource) + return nil } jsonPatchData, _ := json.Marshal(DefaultResourceRemoveFinalizers)