[shimV2] Add sandbox filtering to ShimDiag Tasks RPC and introduce DiagSandboxes RPC
维护者通常 2 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 58/100
- Issue 类型
- 功能
- 描述清晰度
- 描述清楚
- 活跃度
- 冷清
- 技术栈
- go
调研方向
从 internal/shimdiag/shimdiag.proto 和现有的 diagTasks 实现开始。跟踪在服务锁下如何访问 s.podControllers,然后添加 issue 中描述的按 sandbox 过滤的行为和 ListSandboxes 响应。完成标准是:省略 sandbox_id 时保留所有 pod 的结果,未知 ID 返回 NotFound,并且调用方可以枚举 sandbox ID。
由索引模型根据 Issue 内容生成。
描述
Summary
The DiagTasks RPC in the ShimDiag service currently returns all tasks running in the UVM across all pods, with no way for callers to filter by sandbox/pod. This is a holdover from when the LCOW shim only supported a single pod per UVM. Now that the shims (V1 and V2) support multiple pods sharing a single UVM, diagnostic callers need a way to scope task listings to a specific sandbox.
Relevant Discussion: https://github.com/microsoft/hcsshim/pull/2685#discussion_r3111949188
// Originally this method was intended to be used in a single pod setup and therefore,
// we do not specify a TaskID in the request. Since this shim can support multiple pods,
// we will return all tasks running in the UVM, regardless of which pod they belong to.
Proposed Changes
- Add a
sandbox_id field to TasksRequest
Updateinternal/shimdiag/shimdiag.proto:
message TasksRequest {
bool execs = 1;
// Optional. If set, only tasks belonging to the specified sandbox/pod
// will be returned. If empty, all tasks across all pods are returned
// (preserves current behavior for backward compatibility).
string sandbox_id = 2;
}
Update diagTasks to look up the specific podController by sandbox_id when provided, instead of iterating over all s.podControllers. Return a NotFound error if the sandbox ID does not exist.
- Add a new
ListSandboxesRPC
Allow callers to enumerate thesandboxes/podscurrently hosted in the UVM, so they can then make targetedDiagTaskscalls.
service ShimDiag {
// ...existing rpcs...
rpc ListSandboxes(SandboxesRequest) returns (SandboxesResponse);
}
message ListSandboxesRequest {
}
message Sandbox {
string id = 1;
// Optional future fields: created_at, task_count, state, etc.
}
message ListSandboxesResponse {
repeated Sandbox sandboxes = 1;
}
Implementation would iterate s.podControllers under the existing service lock and return their IDs.
Backward Compatibility
Adding sandbox_id as an optional field is wire-compatible; existing clients that omit it continue to receive the all-pods listing.
DiagSandboxes is purely additive.
- 主要语言
- Go
- 星标
- 698
- 派生
- 305
- 平均合并
- 2 天 5 小时
- 30 天内合并 PR
- 20
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
microsoft/hcsshim 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 55/100
维护者通常 2 天内回复
-
Stdin handle required to avoid conpty race condition upon WCOW container startup with terminal可能已有人在做 @mcayland-ntx 于 37 天前认领。 未关闭
难度 4/5 3-5 天 新手友好度 42/100
microsoft/hcsshim#2831 · 3 条评论 ·
维护者通常 2 天内回复
-
难度 4/5 3-5 天 新手友好度 52/100
microsoft/hcsshim#2823 · 8 条评论 ·
维护者通常 2 天内回复
-
难度 3/5 1-2 天 新手友好度 68/100
维护者通常 2 天内回复
-
难度 4/5 3-5 天 新手友好度 62/100
维护者通常 2 天内回复
查看 microsoft/hcsshim 的全部 Issue
相似的 Issue
-
perf(translator): Claude→Responses stream re-validates the whole request body on every SSE chunk未关闭
难度 2/5 1-3 小时 新手友好度 72/100
router-for-me/CLIProxyAPI#6665 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
维护者通常 1 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 74/100
superplanehq/superplane#8557 · 1 条评论 ·
维护者通常 1 天内回复
-
copilot-api domain:platform go
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
docs: clarify gh api -f vs -F and @-file expansion in the gh skill可能已有人在做 @MatiasOlivera 今天认领。 未关闭enhancement
难度 2/5 半天 新手友好度 62/100
维护者通常 1 天内回复