feat(gateway): handle launched-driver socket paths that exceed the Unix socket limit
還沒有人認領這個 Issue。
評估
研究方向
Start where the gateway binds each launched driver's socket under $XDG_STATE_HOME/openshell/run/launch-XXXXXX/driver.sock, and compare it with the VM driver's existing over-long per-sandbox socket check. Decide between an explicit length error and a private /tmp/openshell-<uid> fallback, then add a unit test that uses a long base directory. Done means a long state directory no longer yields a bare SUN_LEN bind error and any fallback warning names the location.
由索引模型根據 Issue 內容生成。
描述
User Story
I use OpenShell with launched compute drivers (Docker, Podman, VM) and run the gateway under state directories of varying depth, including CI workspaces. I directly encountered the gateway failing to start a driver because its socket path was too long. This affects whether the gateway starts at all.
Problem Statement
The gateway binds each launched driver's Unix socket under $XDG_STATE_HOME/openshell/run/launch-XXXXXX/driver.sock. A Unix socket path is limited to about 104 bytes on Linux and macOS. When the state directory is deep, the driver fails to bind with path must be shorter than SUN_LEN and the gateway does not start. The gateway does not check the length and has no way to recover.
Impact / Why This Matters
Operators with long XDG_STATE_HOME values, such as CI workspaces or per-user directories on shared hosts, get an opaque bind error. Their workaround is to choose a shorter state directory. The VM driver already rejects over-long per-sandbox socket paths with an explicit error, so behaviour is inconsistent.
Desired Workflow
The gateway checks the socket path length before it starts a driver. When the path would be too long, it either names the cause and the fix in the error, or places the launch directory under a short private location such as /tmp/openshell-<uid> (owner-only, checked as the existing socket directory is) and logs a warning. Success: a long state directory never produces a bare SUN_LEN bind error.
Acceptance Criteria
- A state directory long enough to exceed the socket path limit does not produce a bare bind error.
- If a fallback location is used, it is private to the gateway's user and the warning names it.
- A unit test covers a long base directory.
Related: #5384, #5385. Deferred from the launcher PR to keep that change free of new behaviour.
- 主要語言
- Rust
- 星號
- 21.5k
- 分支
- 2.1k
- PR 合併指標
- 30 天內沒有已合併 PR
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
NVIDIA/OpenShell 的其他 Issue
-
state:triage-needed
難度 2/5 1-3 小時 新手友好度 86/100
-
state:triage-needed
難度 2/5 1-3 小時 新手友好度 78/100
-
bug: Ready=False/PodTerminating is treated as a terminal sandbox failure可能已有人在做 @TaylorMutch 於 9 天前認領。 未關閉state:accepted state:pr-opened
難度 2/5 1-3 小時 新手友好度 78/100
-
state:triage-needed
難度 1/5 1-3 小時 新手友好度 78/100
-
state:triage-needed
難度 2/5 1-3 小時 新手友好度 62/100
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 72/100
維護者通常 2 天內回覆
-
autofixer: follow-up
難度 2/5 1-3 小時 新手友好度 78/100
tursodatabase/turso#12531 ·
維護者通常 1 天內回覆
-
bug help wanted ui
難度 2/5 1-3 小時 新手友好度 82/100
userFRM/egui-charts#4292 ·
維護者通常 1 天內回覆
-
Issue-Bug Need-Review
難度 1/5 1-3 小時 新手友好度 85/100
PowerShell/DSC#1832 ·
維護者通常 1 天內回覆
-
bug
難度 2/5 1-3 小時 新手友好度 76/100
維護者通常 1 天內回覆