diff --git a/hack/e2e-apps/bucket.bats b/hack/e2e-apps/bucket.bats index e51053a60..10a486742 100644 --- a/hack/e2e-apps/bucket.bats +++ b/hack/e2e-apps/bucket.bats @@ -21,7 +21,18 @@ EOF # Wait for the bucket to be ready kubectl -n tenant-test wait hr bucket-${name} --timeout=5m --for=condition=ready timeout 60 sh -ec "until kubectl -n tenant-test get bucketclaims.objectstorage.k8s.io bucket-${name} >/dev/null 2>&1; do sleep 2; done" - kubectl -n tenant-test wait bucketclaims.objectstorage.k8s.io bucket-${name} --timeout=300s --for=jsonpath='{.status.bucketReady}' + # The COSI controller requeues the BucketClaim until the backend Bucket's + # readiness propagates, so this converges within tens of seconds. Assert + # bucketReady=true explicitly: a bare jsonpath match also matches the literal + # "false", so the unqualified form passed against an unready claim. The tight + # bound makes a propagation-race regression fail fast instead of hiding. + kubectl -n tenant-test wait bucketclaims.objectstorage.k8s.io bucket-${name} --timeout=120s --for=jsonpath='{.status.bucketReady}'=true || { + echo "=== BucketClaim did not converge to bucketReady=true ===" + kubectl -n tenant-test get bucketclaims.objectstorage.k8s.io bucket-${name} -o yaml 2>&1 || true + echo "=== backend Buckets (cluster-scoped) ===" + kubectl get buckets.objectstorage.k8s.io -o wide 2>&1 || true + false + } timeout 60 sh -ec "until kubectl -n tenant-test get bucketaccesses.objectstorage.k8s.io bucket-${name}-admin >/dev/null 2>&1; do sleep 2; done" kubectl -n tenant-test wait bucketaccesses.objectstorage.k8s.io bucket-${name}-admin --timeout=300s --for=jsonpath='{.status.accessGranted}' timeout 60 sh -ec "until kubectl -n tenant-test get bucketaccesses.objectstorage.k8s.io bucket-${name}-viewer >/dev/null 2>&1; do sleep 2; done" diff --git a/hack/e2e-apps/harbor.bats b/hack/e2e-apps/harbor.bats index 0648b1037..8fe300939 100644 --- a/hack/e2e-apps/harbor.bats +++ b/hack/e2e-apps/harbor.bats @@ -43,13 +43,22 @@ EOF timeout 60 sh -ec "until kubectl -n tenant-test get hr $release >/dev/null 2>&1; do sleep 2; done" kubectl -n tenant-test wait hr $release --timeout=5m --for=condition=ready - # Wait for COSI to provision bucket. The driver creates the Bucket and grants - # access quickly, but the central COSI controller's propagation of the Bucket's - # readiness back onto the namespaced BucketClaim can lag several minutes on a - # loaded runner, so allow the same 10m budget the dependent HelmRelease gets. + # Wait for COSI to provision the bucket. The driver creates the backend Bucket + # and grants access; the central COSI controller requeues the BucketClaim until + # the Bucket's readiness has propagated, so it converges within tens of seconds. + # A frozen claim (the propagation race this guards against) never converges, so + # the tight bound surfaces that regression instead of masking it. timeout 60 sh -ec "until kubectl -n tenant-test get bucketclaims.objectstorage.k8s.io $release-registry >/dev/null 2>&1; do sleep 2; done" kubectl -n tenant-test wait bucketclaims.objectstorage.k8s.io $release-registry \ - --timeout=600s --for=jsonpath='{.status.bucketReady}'=true + --timeout=120s --for=jsonpath='{.status.bucketReady}'=true || { + echo "=== BucketClaim did not converge to bucketReady=true ===" + kubectl -n tenant-test get bucketclaims.objectstorage.k8s.io $release-registry -o yaml 2>&1 || true + echo "=== backend Buckets (cluster-scoped) ===" + kubectl get buckets.objectstorage.k8s.io -o wide 2>&1 || true + echo "=== objectstorage-controller ===" + kubectl -n cozy-objectstorage-controller get pods 2>&1 || true + false + } timeout 60 sh -ec "until kubectl -n tenant-test get bucketaccesses.objectstorage.k8s.io $release-registry >/dev/null 2>&1; do sleep 2; done" kubectl -n tenant-test wait bucketaccesses.objectstorage.k8s.io $release-registry \ --timeout=60s --for=jsonpath='{.status.accessGranted}'=true