fix(pvc): converge external populator dependency handoffs - #9
Open
weicao wants to merge 5 commits into
Open
Conversation
Treat terminating populated PVs, helper PVCs, and selected Nodes as topology-not-ready before external-populator handoff commits. Cover each dependency with focused no-write regressions.
Capture guest PV creation, populate-helper creation, and PV Bound visibility transitions after the target PVC pre-gate returns (nil, false, nil). Require an authoritative mapped target request while preserving zero timer retries.
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.
Problem
An external-populator target PVC can reconcile before its guest PV or populate-helper dependency reaches an authoritative state. Later PV/helper cache convergence does not enqueue the target PVC, so the handoff can remain incomplete with timer requeues at zero.
The same reconcile path performs direct optimistic-lock host materialization writes after constructing
SyncerPatcher. A later deferred host patch could therefore use the stale pre-write baseline and overwrite another writer or replay stale state.Change
SyncerPatcherto the server-returned object/resourceVersion after direct materialization or a fresher host target read;NotFound while mapping means skip the current event; the watched authoritative create/recreate event supplies the later wake. A missing host PV in materialization retains the existing scoped 2s convergence result. An invalid rebase object or empty committed resourceVersion is an error.
Commit stack
This PR is cumulative on
fix/external-populator-topology-gateand preserves the already reviewed exact prerequisite heads:22d640701c1468285571edee50f8ea6775944e53terminating-dependency guard82b48a2ee57b2edc19b4f77769e3a6ac96e2e679effective host StorageClass projection42a462faadada201fec1bd539d83f419e4822f81canonical tests-only dependency-wakeup REDf2206ed0319f9bf519dc4eeeebe85724f5968a78implementation and negative/wiring coverageFinal tree:
f36d7e9d3e0da9406df38e67c95a9655af84abd0.Design contract
82b48a2echart/config/RBAC projection prerequisite;f2206ed0adds no chart or RBAC delta.ModifyController/builder/cache/informer coverage proves both dependency event types reach the exact target.Verification
go test ./pkg/controllers/resources/persistentvolumeclaims -count=1go test -race ./pkg/controllers/resources/persistentvolumeclaims -count=1go test ./pkg/controllers/resources/... -count=1go test ./pkg/patcher ./pkg/controllers/resources/persistentvolumes ./pkg/controllers/resources/storageclasses -count=1go vet ./pkg/controllers/resources/persistentvolumeclaims ./pkg/patcherhelm unittest chart(20 suites, 219 tests)git diff --check