docs(gateway-config): VM driver example lists sandbox_uid but VmComputeConfig rejects it
还没有人认领这个 Issue。
评估
- 难度
- 1/5
- 预计耗时
- 1 小时以内
- 新手友好度
- 82/100
- Issue 类型
- 文档
- 描述清晰度
- 描述清楚
- 活跃度
- 冷清
- 技术栈
- rust
调研方向
从 docs/reference/gateway-config.mdx 中 423–425 行附近的 VM 驱动示例开始,然后将其字段与 crates/openshell-server/src/compute/vm.rs:65 中的 VmComputeConfig 进行比较。检查 crates/openshell-driver-vm/src/driver.rs:231 中的独立驱动定义,并验证示例只包含 gateway parser 接受的字段;重现最小 TOML 配置,以确认它不再失败。
由索引模型根据 Issue 内容生成。
描述
Agent Diagnostic
- Skills loaded: create-github-issue
- OpenShell version tested: main @ 8cf2673c
- Latest release checked: unable to verify
- Known fixes reviewed: #1959 (sandbox UID injection feature) and #2335 (Docker/Podman identity injection PR) are in-flight but neither addresses this docs bug
- Possible duplicates reviewed: searched open issues for
sandbox_uid— no existing report for this docs problem - Findings: uncommenting
sandbox_uidin the VM driver TOML example crashes the gateway at startup - Remaining reason for filing: the docs example advertises a field that the gateway TOML parser rejects
Description
Actual behavior: The VM driver example in docs/reference/gateway-config.mdx (lines 423–425) shows:
# sandbox_uid = 20001
Uncommenting this line causes the gateway to crash at config parse time:
Error: configuration error: invalid [openshell.drivers.vm] table: unknown field
`sandbox_uid`, expected one of `state_dir`, `driver_dir`, `default_image`,
`grpc_endpoint`, `bootstrap_image`, `krun_log_level`, `vcpus`, `mem_mib`,
`overlay_disk_mib`, `guest_tls_ca`, `guest_tls_cert`, `guest_tls_key`
VmComputeConfig in crates/openshell-server/src/compute/vm.rs:65 uses #[serde(deny_unknown_fields)] and has no sandbox_uid field.
Expected behavior: The docs example should only show fields that the gateway TOML parser accepts. sandbox_uid exists on VmDriverConfig in the standalone openshell-driver-vm subprocess (crates/openshell-driver-vm/src/driver.rs:231), where it is set via --sandbox-uid / OPENSHELL_VM_SANDBOX_UID CLI args — not through the gateway TOML file.
Reproduction Steps
- Create a minimal TOML file with the VM driver and
sandbox_uiduncommented:[openshell] version = 1 [openshell.gateway] compute_drivers = ["vm"] disable_tls = true [openshell.drivers.vm] sandbox_uid = 20001 - Run
openshell gateway --config /path/to/file.toml - Observe the "unknown field
sandbox_uid" error
Proposed Fix
Remove lines 423–425 (the sandbox_uid comment block) from the VM driver example in docs/reference/gateway-config.mdx. The Kubernetes driver example at line 294 correctly shows sandbox_uid because KubernetesComputeConfig does accept it.
Environment
- OS: macOS Darwin 25.5.0
- OpenShell: main branch (8cf2673c)
- 主要语言
- Rust
- 星标
- 8.7k
- 派生
- 1.3k
- 平均合并
- 2 天 6 小时
- 30 天内合并 PR
- 236
贡献指南
从这里开始
- 先读完整个 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 小时 新手友好度 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug
难度 2/5 1-3 小时 新手友好度 68/100
gitbutlerapp/gitbutler#15998 · 1 条评论 ·
-
bug triage:deciding
难度 1/5 1 小时以内 新手友好度 88/100
open-telemetry/otel-arrow#4132 ·
-
难度 2/5 1-3 小时 新手友好度 88/100
-
难度 2/5 1-3 小时 新手友好度 84/100