Pasta address family detection relies on /etc/resolv.conf's address families #1014
Labels
No labels
Affects/CppNix
Affects/Nightly
Affects/Only nightly
Affects/Stable
Area/build-packaging
Area/cli
Area/evaluator
Area/fetching
Area/flakes
Area/language
Area/lix ci
Area/nix-eval-jobs
Area/profiles
Area/protocol
Area/releng
Area/remote-builds
Area/repl
Area/repl/debugger
Area/store
awaiting
author
awaiting
contributors
bug
Context
contributors
Context
drive-by
Context
maintainers
Context
RFD
crash 💥
Cross Compilation
devx
docs
Downstream Dependents
E/easy
E/hard
E/help wanted
E/reproducible
E/requires rearchitecture
Feature/S3
imported
Language/Bash
Language/C++
Language/NixLang
Language/Python
Language/Rust
Needs Langver
OS/Linux
OS/macOS
performance
regression
release-blocker
stability
Status
blocked
Status
invalid
Status
postponed
Status
wontfix
testing
testing/flakey
Topic/Large Scale Installations
ux
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lix-project/lix#1014
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Describe the bug
Our pasta address family detection relies on
/etc/resolv.conf's address families.So if you are running an IPv4-only resolver on an IPv6-only WAN system, you will run into troubles (and vice versa).
Workarounds exist to fix that, but are fragile and makes things more complicated for an end user to debug.
Steps To Reproduce
127.0.0.53Expected behavior
Success.
nix --versionoutputSince pasta is enabled.
Additional context
Discovered in AFNix infrastructure and workarounded in https://git.afnix.fr/afnix/infra/src/branch/main/services/resolver/default.nix#L38-L41.
Proposal:
AF detection logic should act this way:
Additionally to this logic, if the existing DNS resolvers uses an AF that is unsupported, add the support for this new AF as well.
As a conclusion:
This solves the AF detection problems. I will add more "unit testing" to the rewrite logic as well.
we don't actually do any AF detection here, that part is done by pasta (which doesn't configure addresses/routes we ask it to if that would blackhole traffic). this leads to no v4 route being available on v6-only systems with resolved, not anything we do. what we can influence though is the namerserver list we provide: since pasta will forward dns queries to all nameserver we'd configure exactly the same way we should just configure both v4 and v6 nameservers in the sandbox at all times. worst case one of them can't be used because there's no route available to reach it.
This issue was mentioned on Gerrit on the following CLs: