Sandboxed tools have no DNS on NixOS hosts: ro-bound /etc config symlinks dangle without /nix #13
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?
Observed (engine 0.4.1, bee, NixOS 26.05): every networked package run in-sandbox fails name resolution:
railway whoami-> OAuth refresh fails:network error ... dns error: failed to lookup address information: Temporary failure in name resolutionagent-browser install->Failed to fetch version info ... dns error ... name resolutionbash -c 'cat /etc/resolv.conf'-> No such file or directory (same for /etc/nsswitch.conf)Same packages are fine on the thinkpad (Fedora atomic host).
Root cause:
build_bwrap_argsdoes--ro-bind /etc /etc(host /etc into the sandbox). On NixOS, /etc config files are symlinks into the store (/etc/resolv.conf -> /etc/static/resolv.conf -> /nix/store/...). The sandbox has no /nix mount, so every store-indirected config dangles - resolv.conf, nsswitch.conf, likely CA certs too - and every getaddrinfo fails. On Fedora hosts /etc files are real files, so the bind carries them intact.Evidence it is the symlink, not networking: bwrap shares the host net ns; a manual bwrap with
--ro-bind <resolved-store-path>/resolv.conf /etc/resolv.confresolves fine.Fix directions:
files dns) rather than binding host /etc wholesale.Impact: bubblebox-pkgs CI runs on bees (NixOS) - any smoke check touching the network fails there even when the package is correct (found while packaging railway + agent-browser). Workaround: run networked verification from a Fedora host or seed state host-side.