Skip to content

setup-ocp.sh: AB2 sandbox-pool readiness poll spins full timeout (queries a podTemplate label on the Sandbox CR) #103

Closed

Description

@pdettori

Summary

In deploy/knative/setup-ocp.sh, the SH_AUTHBRIDGE=1 AB2 sandbox-pool readiness poll computes its
target ready-count from:

ab2_want=$(( $(kubectl get sandbox -l sh.kagenti.io/sandbox-pool=default ... | wc -l) * 2 ))

But the sh.kagenti.io/sandbox-pool=default label lives on the pod template
(podTemplate.metadata.labels) in sandbox-pool-ab2.yaml, not on the Sandbox CR itself (whose
only label is app: sandbox). So kubectl get sandbox -l sh.kagenti.io/sandbox-pool=default returns
0 rows, ab2_want stays 0, the poll loop's [ "$ab2_want" -gt 0 ] break condition is never
met, and the loop runs its full ~150×2s ≈ 5 minute budget before falling through to the
authoritative kubectl wait --for=condition=Ready.

Impact

Correctness is unaffected — the authoritative wait still gates properly — but every
SH_AUTHBRIDGE=1 OCP run wastes up to ~5 minutes in the pre-poll.

Fix

Count the Sandbox CRs by a label they actually carry, or by count:

ab2_want=$(( $(kubectl get sandbox -n "$NAMESPACE" -l app=sandbox --no-headers | wc -l) * 2 ))
# or simply: kubectl get sandbox --no-headers | wc -l

Notes

Found during the RC1-4 OCP live gate. The gate wrapper rc1-ocp-gate.sh correctly waits on pod
labels, so it is not affected.

Assisted-By: Claude (Anthropic AI) [email protected]

Activity

  1. added a commit that references this issue on Jul 14, 2026
    1533f77
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions