bug(examples): podman demo scripts cannot run on macOS (chmod on SPIRE socket fails over virtiofs)
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 45/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- macos, shell
- 领域
- devops, infrastructure
调研方向
从 podman/spire/start-server-oidc.sh、podman/spire/start-agent.sh 和 podman/README.md 开始;使用 macOS 上的 Podman machine 重现故障,并跟踪主机目录挂载和 socket 就绪检查。确定此更改是记录仅支持 Linux,还是使状态和就绪状态能够跨越 VM 边界工作,然后验证 server、agent 和下游 demo 组件都能成功启动。
由索引模型根据 Issue 内容生成。
描述
What happens
Running the Podman SPIFFE token exchange demo on macOS with podman machine, the SPIRE server crashes during startup:
level=info msg="Starting Server APIs" address="[::]:8081" network=tcp
level=error msg="Fatal run error" error="chmod /run/spire/server/private/api.sock: invalid argument"
level=error msg="Server crashed" error="chmod /run/spire/server/private/api.sock: invalid argument"
Every downstream component (OIDC discovery provider, agent, gateway, sandbox) then fails as a consequence, which makes the root cause hard to locate from the symptoms.
Why
podman/spire/start-server-oidc.sh bind-mounts a host directory into the container:
-v "${server_dir}:/run/spire/server:z"
SPIRE creates its API socket in that directory and then chmods it. When SPIRE_STATE_DIR lives on the macOS host, the directory reaches the VM over virtiofs, where chmod on a unix socket returns EINVAL.
podman/spire/start-agent.sh has the same pattern for the Workload API socket:
-v "${agent_dir}:/run/spire/agent:z"
podman/README.md makes no platform statement, so a macOS host reads as a supported configuration.
Workarounds tested
- Podman named volume for
/run/spire/serveravoids thechmodentirely and the server stays up. It has no host path, though, andSPIRE_AGENT_SOCKET_HOST_PATHneeds to be a mountable path because the gateway passes it into sandbox containers. - A path native to the VM (for example under
/var/tmp) works as a bind mount for both server and agent, but the scripts' host-sidemkdir -pandwait_for_socketthen operate on the macOS filesystem rather than the one the containers use, so they create stray directories and the socket wait times out. - Running the scripts entirely inside the Podman machine VM works today, with
SPIRE_STATE_DIRon a VM-native path. This is what we ended up doing.
Suggested fix
Either of:
- Document the demo as requiring a Linux host, which is the cheaper option and sets expectations correctly.
- Place SPIRE state on a filesystem native to the container runtime and wait for readiness via
podman execinside the container rather than polling a host path. That would make the demo work unmodified on macOS.
Environment
- macOS 15 (Darwin 25.6.0), Podman 6.1.1
- Podman machine: Fedora CoreOS 44, kernel 7.0.11 aarch64
- SPIRE images:
ghcr.io/spiffe/spire-server:1.12.4,ghcr.io/spiffe/oidc-discovery-provider:1.12.4
- 主要语言
- Rust
- 星标
- 8.7k
- 派生
- 1.3k
- 平均合并
- 2 天 8 小时
- 30 天内合并 PR
- 271
贡献指南
从这里开始
- 先读完整个 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
-
难度 2/5 1-3 小时 新手友好度 75/100
n0-computer/iroh#4550 ·
-
难度 2/5 1-3 小时 新手友好度 65/100
paritytech/zombienet-sdk#591 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
farion1231/cc-switch#7638 · 1 条评论 ·
-
onnx-ir re-exports ModelProto and GraphProto but not NodeProto, AttributeProto and AttributeType 未关闭
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 2/5 1-3 小时 新手友好度 75/100