Gate the network on Prepared, never on Programmed - #244
Merged
Conversation
scotwells
marked this pull request as ready for review
August 21, 2026 00:49
Programmed becomes true at sandbox creation, which a provider defers while any gate remains, so gating on it deadlocks. Record why the gate stays on Bound and Allocated, and add a test that a claim reporting Programmed=False or Unknown still releases the gate. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Prepared reports that the data plane's pre-Pod artifacts exist, so a Pod created now can be attached. Programmed only becomes true once that Pod's sandbox exists, so gating on it waits on itself. The gate becomes Bound + Allocated + Prepared, and Prepared joins the conditions mirrored onto Instance status and the reasons surfaced on refusal. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
A condition type duplicated as a string in two repos fails closed and silent: rename it upstream and compute never finds the condition, reads it as not-True, and gates every networked instance with nothing naming the cause. Pin NSO to the commit carrying the constant and use it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
scotwells
force-pushed
the
fix/network-gate-programmed-deadlock
branch
from
August 21, 2026 00:55
e8af524 to
34cd609
Compare
…merged datum-cloud/network-services-operator#393 is merged, so the pin no longer targets an unmerged branch. The latest tag still predates the Prepared condition, so this stays a main pseudo-version until a release carries it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
privateip
approved these changes
Aug 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Network scheduling gate now waits for the data plane to be ready to receive a Pod, and still never waits for the attachment itself.
networkInterfaceClaimSatisfiedbecomes Bound + Allocated + Prepared.Preparedmeans the data plane's pre-Pod artifacts exist, so a Pod created now can be attached. It becomes true before any Pod exists, which is what makes waiting on it safe.Programmedstays excluded, permanently, and the function now says why at length — the deadlock argument is the reason the two conditions exist separately.Programmedbecomes true when the interface is attached at sandbox creation, and the infrastructure provider defers creating the Pod while any scheduling gate remains, so a gate waiting onProgrammedwaits on itself: no Pod, no attachment; no attachment, noProgrammed. It reaches consumers throughInstance.status.networkInterfaces[].conditions, which is already mirrored.Two paired tests keep both halves honest: a claim with
ProgrammedFalse or Unknown still releases the gate, and a claim withPreparedFalse or Unknown does not.Preparedalso joins the conditions mirrored onto Instance status and the reasons surfaced when a claim is refused, so a stuck instance says why instead of sitting gated in silence.The condition type comes from NSO rather than being repeated here as a string. A duplicated condition literal fails closed and quiet — rename it upstream and compute simply never finds the condition, reads it as not-True, and holds every networked instance with no error naming the cause.
Before this merges
The
network-services-operatorpin points atmain, not a branch — datum-cloud/network-services-operator#393 has merged. The latest tag still predates thePreparedcondition, so re-pin once a release carries it.Do not merge until the VPC controller is deployed in every cell running the networking integration. Nothing writes
Preparedtoday, so merging first leaves every networked instance gated indefinitely, with no error naming the cause.Related
🤖 Generated with Claude Code