Repository navigation
[Bubblewrap / CI]: Pin the name-service chain the loopback-resolver DNS test resolves through - #1488
Merged
Elliot (theelliotm) merged 1 commit intoOct 13, 2026
Conversation
…rough The suite publishes a resolver file inside a private mount namespace and expects both the host-side control and the sandbox to read it. That only holds for lookups that reach nss_dns. A chain whose first module answers from somewhere else never consults the file: systemd-resolved answers from a daemon outside the namespace, which cannot see the published stub, and declines a reserved TLD without querying anyone. The control then fails immediately with the peer untouched, so the suite aborts before the sandbox is ever launched. Bind a minimal nsswitch.conf over the host's inside the namespace. bwrap binds /etc, so the sandbox resolves through the same chain. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Elliot (theelliotm)
marked this pull request as ready for review
October 13, 2026 21:47
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The focused test-only change correctly addresses the Debian 13 failure and is validated across supported Bubblewrap environments.
0 open findings
What changed in this PR
Updates the Bubblewrap DNS test fixture so lookups reliably reach the namespace-local stub resolver on systems using nss-resolve.
Changes:
- Bind-mounts a minimal
nsswitch.confusingfiles dns. - Fails clearly if the resolver-chain override cannot be mounted.
| File | Description |
|---|---|
tests/scripts/run_bwrap_dns_test.sh |
Pins NSS host resolution inside the test namespace. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Soham Das (SohamDas2021)
approved these changes
Oct 13, 2026
Elliot (theelliotm)
deleted the
user/emichlin/fix-bwrap-debian-loopbackdns-test
branch
October 13, 2026 22:15
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.
📖 Description
The Bubblewrap loopback-resolver DNS suite publishes a resolver file inside a private mount namespace and expects both its host-side control and the sandbox to read it. That only holds for lookups that reach glibc's
nss_dns. On Debian 13 the chain starts withsystemd-resolved, which answers from a daemon outside the namespace — it never sees the published stub, and it declines a reserved TLD without querying anyone. The control failed instantly with the stub peer untouched (~120 ms, not the 10 s timeout), so the suite aborted before the sandbox was ever launched. The fix binds a minimalnsswitch.confover the host's inside the namespace, pinning the chain tofiles dns. Since bwrap binds/etc, the sandbox resolves through the same chain, which matters because the in-sandbox assertion was headed for the same short-circuit.This is a test-fixture fix only — no product code changes. The resolver-pin behavior from #1453 was never reached on Debian 13, so it was untested there rather than broken. Note that the probe name stays
.invalid: it is the right marker once the lookup genuinely reaches the stub, and renaming it would not have helped, sincenss-resolveignoresresolv.conffor every name.🔗 References
Resolves #1481. Fixes the suite added in #1453.
🔍 Validation
Scheduled Validation Tests (
nightly) on this branch: run 38463281609 — all green, includingdebian-13, x64, bubblewrap, which had failed on every nightly since #1453 merged. That run was temporarily scoped to the four Bubblewrap legs (ubuntu-26.04, ubuntu-24.04, rhel-10, debian-13); the scoping commit was dropped before this PR, so the branch contains only the test change.Debian 13 now runs the suite to completion instead of aborting at the control:
Also reproduced the failure mode locally (WSL, Ubuntu 26.04) with a harness mirroring the fixture, which confirms the lookup never reaches the resolver file and that the pin is load-bearing:
files dns(unmodified host)files(short-circuited)files dns(pinned by this change)✅ Checklist
Cargo.lock, thedependency-feed-checkcheck passes (see pull request builds)📋 Issue Type
Microsoft Reviewers: Open in CodeFlow