orchestrator: no CLI to inspect active NBD devices; lsblk shows 4096 pre-allocated noise
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 68/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 静か
- 技術スタック
- go, linux
- 領域
- cli, observability
調査の方向性
まず pkg/sandbox/nbd/pool.go、特に ConnectedDevices と DevicePool の構築を確認し、次に cmd/inspect-build のエントリポイントと規約を比較します。cmd/inspect-nbd が接続済みスロットをデバイス、サイズ、PID とともに報告し、-json をサポートし、提案された pool のステータスと設定された最大値の処理を含んでいれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Problem
On a sandbox node, running lsblk | grep nbd | wc -l returns 4096 — one line per pre-allocated device. All show SIZE=0B when idle, making it impossible to quickly identify which devices are actively connected to a sandbox.
# current operator experience
$ lsblk | grep nbd | wc -l
4096
# no easy way to filter to just connected ones
The 4096 devices are expected — start-client.sh loads the nbd module with nbds_max=4096 and this is persisted in /etc/modprobe.d/nbd.conf. This is correct behavior. The problem is observability: there is no tool to see which of those 4096 slots are actually in use.
What exists today
pkg/sandbox/nbd/pool.go already has the machinery:
ConnectedDevices()— scans/sys/block/nbdX/pidand returns only connected slotsDevicePool.usedSlots— a bitset of pool-tracked slots (not accessible externally)- OTEL metrics:
orchestrator.nbd.slots_pool.acquired/released/ready— aggregate counts only
None of this is exposed via a CLI or debug endpoint. When a kernel I/O error like block nbd316: Receive control failed appears in dmesg, there is no way to correlate nbd316 to a sandbox ID.
Missing pieces
- No CLI tool that calls
ConnectedDevices()and prints a table of active devices (slot, path, size, PID) — analogous tocmd/inspect-build - No slot → sandbox ID mapping in
DevicePool— even internally,usedSlotsonly tracks which slots are occupied, not which sandbox occupies each slot DevicePooldoesn't storemaxDevices— callers must re-read/sys/module/nbd/parameters/nbds_maxto know the pool ceiling
Proposed fix
Add cmd/inspect-nbd: a lightweight operator tool that shows only active NBD devices.
Example output:
NBD devices: 3 connected / 4096 configured
SLOT DEVICE SIZE (MB) PID
3 /dev/nbd3 1024 18234
17 /dev/nbd17 2048 18891
316 /dev/nbd316 1024 19012
Flags: -json for machine-readable output.
Secondary improvement: store maxDevices on DevicePool at construction (avoids re-reading sysfs on every call) and expose a Status() method returning used/max counts for future debug endpoints.
Slot → sandbox ID mapping is left as follow-up work.
- 主要言語
- Go
- スター
- 1.6k
- フォーク
- 438
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
e2b-dev/runtime のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
sandbox cache: StartRemoving state transition not broadcast, all allocations see stale Running state オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 86/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
e2b-dev/runtime の issue をすべて見る
似ている issue
-
agentic-workflows
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
agentic-workflows
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
microsoft/agent-framework-go#1179 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
[Bug]: OLLAMA_KEEP_ALIVE="5m" / "24h" crashes Ollama embedding and vision models with ValueError オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
infiniflow/ragflow#20223 · リアクション 1 件 ·
-
bug needs triage pkg/translator/faro
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
open-telemetry/opentelemetry-collector-contrib#51484 · コメント 1 件 ·