Repository navigation
fix: Let a context settle when its network's DNS is off - #847
Merged
Merged
Conversation
The project reconciler stamped the internal-dns-region annotation and then, because the network's DNS is off, cleared it again with the rest of the intent. Each write is an event on the context it reconciles, so it never settled. Decide that DNS is off before the region is stamped.
andrewb3000
approved these changes
Nov 3, 2026
1 of 2 tasks
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.
Since internal DNS was turned on in production on 2026-10-30, the hub's project reconciler rewrites a NetworkContext several times a second when the context's Network has DNS off and its location has an internal-DNS region. Each such context today is the internal DNS producer network's: one in production (us-central-1), two in staging. The reconcile stamps the region annotation, then
disableclears it with the rest of the intent. Each write is an event on the context it reconciles, so it never settles, and the replicator and Karmada carry every change to the cells.Changes
internaldns_controller.godisablethen cleans up with the region the context last carried, which is the region of any access binding it made.Corner cases
TestInternalDNSProjectSettlesWhenDNSIsOff/in_a_location_with_a_regionTestInternalDNSProjectSettlesWhenDNSIsOff/in_a_location_without_a_regionTestInternalDNSProjectSettlesWhenDNSIsOff/after_DNS_was_onTestInternalDNSProjectLifecycleFencesAccessCost of the loop, per minute, read on 2026-11-03
The change adds no read and no write.
reconcile: gocyclo 30 → 30, gocognit 39 → 39.Test plan
main, both cases in a location with a region fail: the second reconcile writes the context twice. All pass with the change.disablewithout its cleanup, its finalizer removal or the region in the intent.golangci-lintv2.15.0 andinternal/controller's tests pass.main's builds, the two producer contexts stop changing and Milo's NetworkContext PATCH rate falls near 0.