docs(gateway-config): VM driver example lists sandbox_uid but VmComputeConfig rejects it

未关闭 适合新手
#2,364 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
1/5
预计耗时
1 小时以内
新手友好度
82/100
Issue 类型
文档
描述清晰度
描述清楚
活跃度
冷清
技术栈
rust
领域
documentation

调研方向

从 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 内容生成。

描述

area:docs state:stale

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_uid in 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

  1. Create a minimal TOML file with the VM driver and sandbox_uid uncommented:
    [openshell]
    version = 1
    
    [openshell.gateway]
    compute_drivers = ["vm"]
    disable_tls = true
    
    [openshell.drivers.vm]
    sandbox_uid = 20001
    
  2. Run openshell gateway --config /path/to/file.toml
  3. 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

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

NVIDIA/OpenShell 的其他 Issue

查看 NVIDIA/OpenShell 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。