Repository navigation
dns: preserve failures in dual-family resolution - #47494
Merged
yanavlasov merged 2 commits intoOct 1, 2026
Merged
Conversation
Signed-off-by: Yuchen Wang <162491048+yuchen-db@users.noreply.github.com>
yuchen3642
requested review from
mattklein123 and
yanavlasov
as code owners
September 17, 2026 01:01
|
Hi @yuchen-db, welcome and thank you for your contribution. We will try to review your Pull Request as quickly as possible. In the meantime, please take a look at the contribution guidelines if you have not done so already. |
Member
|
/assign @yanavlasov |
Contributor
|
@yuchen-db thanks for the change. I looks good to me. I can't think how this can break anyone, but it would make this change safer if there was a runtime flag to revert back to the old behavior. Can you please add it? /wait |
Guard the new c-ares behavior behind envoy.reloadable_features.cares_dual_resolution_preserve_failure so it can be reverted to the previous behavior, and add a test covering the guard-disabled path. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: Yuchen Wang <162491048+yuchen-db@users.noreply.github.com>
Contributor
Author
thanks! added a runtime flag |
yanavlasov
approved these changes
Sep 30, 2026
yanavlasov
enabled auto-merge (squash)
September 30, 2026 02:37
Contributor
Author
|
/retest |
1 similar comment
Contributor
Author
|
/retest |
This branch was successfully deployed
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.
In
AUTOandV4_PREFERREDmode, the c-ares resolver falls back to the other address family when the first lookup returns no addresses. Previously a no-records response (ARES_ENODATA/ARES_ENOTFOUND) from either lookup marked the combined resultCompletedeven when the other lookup failed (e.g.ARES_ETIMEOUT), so strict DNS clusters treated it as a successful empty resolution and dropped all their hosts.The resolver now tracks failures across both lookups and reports
Failurewhen a lookup failed and no addresses were obtained. A successful fallback still returns its addresses, two no-records responses still return a successful empty result, and a family skipped byfilter_unroutable_familiesis not counted as a failure. Revert with the runtime guardenvoy.reloadable_features.cares_dual_resolution_preserve_failureset tofalse.Risk Level: Low. Small c-ares bug fix behind a runtime guard.
Testing: Updated the two
NoRecordsDoNotMaskError*tests (renamed fromFallbackToNodataWithError*) to expectFailure; addedSuccessfulFallbackAfterErrorandNoRecordsMaskErrorWithRuntimeGuardDisabled.dns_impl_testpasses for IPv4 and IPv6.Docs Changes: Documented dual-family failure handling in
docs/root/intro/arch_overview/upstream/dns_resolution.rst.Release Notes: Added
changelogs/current/bug_fixes/dns_resolver__dual_resolution_failure.rst.Platform Specific Features: N/A
Runtime guard:
envoy.reloadable_features.cares_dual_resolution_preserve_failure(defaulttrue)Fixes #38752
AI assistance: Codex assisted with the initial fix and tests; Claude assisted with the runtime guard follow-up and this description.