bug(podman): workload gets no /etc/resolv.conf under network:none, unlike Docker's nameserver 127.0.0.53
@politerealism 已经在做这个了。
开始于 2026年9月23日。
评估
这个 Issue 还没有评估数据。
描述
User Story
As an operator running sandboxes via the Podman driver, I want DNS resolution to work the same way it does with Docker, so sandboxed processes can resolve policy-permitted hostnames without a manual workaround.
Problem Statement
Podman workload containers run with NetworkMode: none (per RFC 0012's isolation model), and Podman does not manage DNS for network-less containers at all — /etc/resolv.conf is left exactly as whatever the base image happens to ship. The Docker driver, by contrast, explicitly configures nameserver 127.0.0.53 in the workload's /etc/resolv.conf, which the sandbox's DNS mediation (network_broker.rs's classify_send) specifically relays only when the destination matches that exact relay address. Podman workloads get no equivalent configuration.
Impact / Why This Matters
Confirmed independently twice:
- During investigation of #3396, DNS resolution silently failed for a Podman-driven sandbox using
ghcr.io/astral-sh/uv:python3.12-bookworm-slim(nosystemd-resolvedconvention baked in) — required building a custom local image with/etc/resolv.confhand-baked viaCOPYto get DNS interception working at all. - PR #3642 hit the identical gap independently: "The Podman workload runs with
NetworkMode: noneand gets no/etc/resolv.conf, while the Docker driver setsnameserver 127.0.0.53. I wrote that line into the workload's/etc/resolv.confby hand."
Any real-world Podman deployment using a base image that doesn't already happen to ship the 127.0.0.53 convention will silently fail DNS resolution for every sandboxed process — including for hostnames the policy explicitly allows — with a generic DNS lookup error rather than any actionable diagnostic pointing at the real cause.
Acceptance Criteria
- The Podman driver explicitly writes or mounts
/etc/resolv.conf(pointing at the sandbox's internal DNS relay address) into the workload container at creation time, matching Docker's behavior, regardless of what the base image ships - This does not depend on Podman's own network-mode-specific DNS management, since
network: noneskips that entirely - Behavior is consistent across rootful and rootless Podman
- A regression test covers DNS resolution working correctly from a Podman-driven sandbox using a base image with no pre-existing DNS relay convention
Reproduction Steps
- Create a Podman-driven sandbox from an image with no
nameserver 127.0.0.53baked into/etc/resolv.conf(e.g.ghcr.io/astral-sh/uv:python3.12-bookworm-slim). - Apply a policy allowing a specific hostname (
openshell policy update --wait --binary <bin> --add-endpoint <host>:443:read-only <sandbox>). - Attempt to resolve that hostname inside the sandbox (
getent hosts <host>). - Resolution fails with a DNS error, even though the host is explicitly policy-permitted.
Environment
- OpenShell current
main(post RFC 0012, post PR #3642) - Compute driver: Podman (rootful and rootless)
- OS: Linux
Related: #3396, PR #3642 (follow-ups section)
- 主要语言
- Rust
- 星标
- 8.7k
- 派生
- 1.3k
- 平均合并
- 2 天 6 小时
- 30 天内合并 PR
- 297
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
NVIDIA/OpenShell 的其他 Issue
-
area:docs
难度 1/5 1 小时以内 新手友好度 88/100
-
state:triage-needed
难度 2/5 1-3 小时 新手友好度 82/100
-
area:cli state:validated
难度 2/5 1-3 小时 新手友好度 72/100
-
state:triage-needed
难度 1/5 1 小时以内 新手友好度 90/100
-
area:build spike state:review-ready state:stale
难度 2/5 半天 新手友好度 68/100
相似的 Issue
-
bug
难度 1/5 1 小时以内 新手友好度 85/100
-
难度 2/5 1-3 小时 新手友好度 75/100
yantrikos/yantrik-os#255 ·
-
bug CLI custom-model
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 2/5 1-3 小时 新手友好度 70/100
raphamorim/rio#1956 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
rust-bitcoin/rust-bitcoin#6930 · 1 条评论 ·