Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

fix(orchestrator): envd error responses truncated to 100 chars, hiding root cause in logs and error chain

オープン
#3,480 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
go

調査の方向性

packages/orchestrator/pkg/sandbox/envd.go を読み、issue で特定されている envd の 4 つのエラーおよびロギングの呼び出し箇所を調査してください。レスポンスボディが返されるエラーとログにどのように渡されるかを確認し、完了した変更によって各箇所で診断用ボディ全体が切り捨てられずに保持されていることを確認してください。

索引モデルが issue の本文から書いたものです。

説明

Problem

In packages/orchestrator/pkg/sandbox/envd.go, all envd error-response bodies are truncated to 100 characters via utils.Truncate(string(body), 100) before being embedded in fmt.Errorf strings and log fields:

```go
// line 182 — callEnvdCollapse
fmt.Errorf("collapse returned %d: %s", resp.StatusCode, utils.Truncate(string(body), 100))

// line 208 — postEnvd (covers /init, /pause, /resume, …)
fmt.Errorf("%s returned %d: %s", path, resp.StatusCode, utils.Truncate(string(body), 100))

// line 287 — CallEnvdUpgrade
fmt.Errorf("upgrade returned %d: %s", resp.StatusCode, utils.Truncate(string(body), 100))

// line 496 — initEnvd log field
zap.String("response_body", utils.Truncate(string(body), 100))
```

Because lines 182, 208, and 287 inject the truncated string directly into the error value, the truncation propagates all the way up the error chain and surfaces to callers as:

```
failed to create sandbox: failed to wait for sandbox start: failed to init new envd: /init returned 400: failed to mount "7e22c38a-5584-4730-8c31-449f5058ea19": failed to chroot into "/data1/orchestrator/vo
```

The message is cut mid-path, losing the actual root cause.

Impact

NFS volume mount failures are a concrete example. The full error body from envd is ~300 characters:

```
failed to mount "7e22c38a-5584-4730-8c31-449f5058ea19": failed to chroot into "/data1/orchestrator/volumes/team-f0796066-fb0b-4ea7-a9fe-613e9b8831bb/vol-885b64ff-686d-4f5c-b16d-eb4d5f9cd577": failed to bind mount "/data1/orchestrator/volumes/team-f0796066-fb0b-4ea7-a9fe-613e9b8831bb/vol-885b64ff-686d-4f5c-b16d-eb4d5f9cd577": no such file or directory
```

At 100 characters the message is truncated to:

```
failed to mount "7e22c38a-5584-4730-8c31-449f5058ea19": failed to chroot into "/data1/orchestrator/vo
```

The operator cannot tell from orchestrator logs or the returned error whether the failure is a missing directory, a permission issue, an NFS timeout, or something else. Diagnosing the root cause requires cross-referencing a completely separate service's logs (the NFS proxy).

Fix

Remove utils.Truncate from the four error-path call sites. envd error response bodies are short diagnostic strings generated by the server, not arbitrary user data, so there is no log-explosion risk.

PR: #3481

主要言語
Go
スター
1.6k
フォーク
448
PR マージ指標
30日以内にマージされた PR はありません

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

e2b-dev/runtime のほかの issue

e2b-dev/runtime の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。