You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Apply DNS updates safely and remove rejected zones #276
internal/internaldns/serving/serial_runner.go: Run wraps the delegate in context.WithTimeout(context.WithoutCancel(ctx), daemonCommandLimit) (30s), and ExecRunner uses exec.CommandContext, which kills only the direct child. The comment "a started session runs to completion" is false once the timeout fires. Either kill the process group and wait for the daemon, or document the cap. The queue is one per runner, not per daemon.
Same file: a joiner waits on call.done. If the owner is cancelled while queued, finish(call, nil, ctx.Err()) hands the joiner context.Canceled. Let a live joiner take over the call instead.
internal/internaldns/serving/update_log.go: Rules counts appendRule( anywhere, including in comments. A failure logs an Error line and returns the same error, so it shows twice.
internal/internaldns/controlplane/context_reconciler.go: on InvalidManagedDomain only status is cleared; the managed DNSZone and DNSZoneAssociation stay. The status-clear condition !Enabled || invalidDomain also stops clearing the managed namespace for contexts invalid for other reasons, such as a duplicate consumerID.
internal/internaldns/runtime/config.go: managedDomainSuffixes accepts a single-label suffix. Require two or more labels, or reject public suffixes, and consider a reserved list for platform zones such as datum.internal.
internal/internaldns/platform/allocator.go: ReleaseDestinations lists all lease ConfigMaps per project per reconcile. deleteClaim swallows Conflict in reserve; it heals on the next pass, but a test would pin it.
internal/internaldns/serving/coredns_test.go: add a step where RequiredPublicationEpoch/Revision rises while a member is behind, and assert the intended SERVFAIL.
The description now explains the problem and expected outcome in plain language. The original report is preserved below for the observations, diagnostics, and implementation details behind this work. It describes the situation when the issue was reported; later comments and the issue state record subsequent progress.
Forwarder updates now give up after 30 seconds. On a timeout only the client process dies, so the next update can still overlap a session the daemon is applying. One queue also covers every daemon, so one stuck push holds up the others.
When a queued update is cancelled, any identical update that joined it fails with the cancelled error and does not run.
A context refused for its domain stops being Ready, but its existing zone stays in place.
Config can permit a one-label suffix such as com, and the platform's own datum.internal is open to any tenant context.
Releasing addresses lists every lease in the platform namespace for each project on each pass, so its cost grows with projects times claims.
Done when a timed-out update cannot overlap the next, joined updates survive a cancelled owner, refused contexts lose their zone, the suffix list refuses one-label and platform names, and the release path has a bound or a benchmark. The file-level detail is in the first comment.
changed the title [-]Private DNS updates can overlap after a timeout and refused zones linger[/-][+]Apply DNS updates safely and remove rejected zones[/+]on Oct 29, 2026
Fresh low-rate staging validation on 29 October found three isolated private-query transport timeouts outside the approved shared-resolver restart: TCP through fd53::53 at 20:25:48 UTC, UDP through fd53::54 at 20:37:02, and UDP through fd53::53 at 20:40:53. Each query had a one-second budget. The first two coincided with isolated Workload replacements; the third occurred while that target was stable, during broader test activity. Public-name controls continued to answer. The cause is not proven, so this is not evidence that the earlier fix in #264 is absent.
Separately, the sustained crash test correctly withdrew the positive address to NODATA on all four private lookup paths and restored it after recovery. Deletion/recreation with a changed allocation also removed the old address and served the new one without returning the old address during the observed window beyond TTL. Expected NODATA/NXDOMAIN during these transitions was not counted as a transport failure.
Next: correlate query timestamps with required/applied publication revisions, forwarding connections and server selection during repeat low-rate testing, including a stable control name. Add a real-path regression asserting DNS responses while preserving intentional withdrawal semantics. Current majority staging serving digest is 215158266038990698fb55956624f3bc1c4a342d38df7d9908a12026f9f84427; runtime is 496d0dd388762c2f668be703e27c8267e719f6700ddb62fc216f70a02515d950. No shared software upgrade was performed.
Fixed by #481 (the remaining items were already fixed on main) and verified in staging. Both labs run a main build that includes it. Over about 2.5 hours, 811 configuration updates were applied and none failed. The slowest took 72 ms, well under the 30 s limit. No timeouts, killed commands, cancelled shared updates, or dnsdist helper errors were logged, and updates are still applying. Logs were checked in the central lab; the east lab runs the same build with no restarts.
Activity
ecv commentedon Oct 22, 2026
File-level detail, as of #265 at 1e1044d, #266 at 137a23d and #268 at 34ce278:
internal/internaldns/serving/serial_runner.go:Runwraps the delegate incontext.WithTimeout(context.WithoutCancel(ctx), daemonCommandLimit)(30s), andExecRunnerusesexec.CommandContext, which kills only the direct child. The comment "a started session runs to completion" is false once the timeout fires. Either kill the process group and wait for the daemon, or document the cap. The queue is one per runner, not per daemon.call.done. If the owner is cancelled while queued,finish(call, nil, ctx.Err())hands the joinercontext.Canceled. Let a live joiner take over the call instead.internal/internaldns/serving/update_log.go:RulescountsappendRule(anywhere, including in comments. A failure logs an Error line and returns the same error, so it shows twice.internal/internaldns/controlplane/context_reconciler.go: onInvalidManagedDomainonly status is cleared; the managed DNSZone and DNSZoneAssociation stay. The status-clear condition!Enabled || invalidDomainalso stops clearing the managed namespace for contexts invalid for other reasons, such as a duplicate consumerID.internal/internaldns/runtime/config.go:managedDomainSuffixesaccepts a single-label suffix. Require two or more labels, or reject public suffixes, and consider a reserved list for platform zones such asdatum.internal.internal/internaldns/platform/allocator.go:ReleaseDestinationslists all lease ConfigMaps per project per reconcile.deleteClaimswallows Conflict inreserve; it heals on the next pass, but a test would pin it.internal/internaldns/serving/coredns_test.go: add a step whereRequiredPublicationEpoch/Revisionrises while a member is behind, and assert the intended SERVFAIL.scotwells commentedon Oct 29, 2026
The description now explains the problem and expected outcome in plain language. The original report is preserved below for the observations, diagnostics, and implementation details behind this work. It describes the situation when the issue was reported; later comments and the issue state record subsequent progress.
Original report and engineering evidence
Private DNS fixes in fix: Keep private DNS answering during zone updates, fix: Serialize and log private DNS forwarder updates and fix: Free private DNS destination claims and refuse unsafe domains leave a few gaps that can stall updates, leave old zones in place, or let config reopen the domain check.
com, and the platform's owndatum.internalis open to any tenant context.Done when a timed-out update cannot overlap the next, joined updates survive a cancelled owner, refused contexts lose their zone, the suffix list refuses one-label and platform names, and the release path has a bound or a benchmark. The file-level detail is in the first comment.
Related to fix: Keep private DNS answering during zone updates
Related to fix: Serialize and log private DNS forwarder updates
Related to fix: Free private DNS destination claims and refuse unsafe domains
[-]Private DNS updates can overlap after a timeout and refused zones linger[/-][+]Apply DNS updates safely and remove rejected zones[/+]scotwells commentedon Oct 29, 2026
Fresh low-rate staging validation on 29 October found three isolated private-query transport timeouts outside the approved shared-resolver restart: TCP through
fd53::53at 20:25:48 UTC, UDP throughfd53::54at 20:37:02, and UDP throughfd53::53at 20:40:53. Each query had a one-second budget. The first two coincided with isolated Workload replacements; the third occurred while that target was stable, during broader test activity. Public-name controls continued to answer. The cause is not proven, so this is not evidence that the earlier fix in #264 is absent.Separately, the sustained crash test correctly withdrew the positive address to NODATA on all four private lookup paths and restored it after recovery. Deletion/recreation with a changed allocation also removed the old address and served the new one without returning the old address during the observed window beyond TTL. Expected NODATA/NXDOMAIN during these transitions was not counted as a transport failure.
Next: correlate query timestamps with required/applied publication revisions, forwarding connections and server selection during repeat low-rate testing, including a stable control name. Add a real-path regression asserting DNS responses while preserving intentional withdrawal semantics. Current majority staging serving digest is
215158266038990698fb55956624f3bc1c4a342d38df7d9908a12026f9f84427; runtime is496d0dd388762c2f668be703e27c8267e719f6700ddb62fc216f70a02515d950. No shared software upgrade was performed.scotwells commentedon Nov 5, 2026
Fixed by #481 (the remaining items were already fixed on main) and verified in staging. Both labs run a main build that includes it. Over about 2.5 hours, 811 configuration updates were applied and none failed. The slowest took 72 ms, well under the 30 s limit. No timeouts, killed commands, cancelled shared updates, or dnsdist helper errors were logged, and updates are still applying. Logs were checked in the central lab; the east lab runs the same build with no restarts.