Workspace readiness waits 2 s for a direct check before it asks the router
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 76/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- go, kubernetes
- 領域
- backend, networking, performance, testing
調査の方向性
internal/ax/reconciler.go の checkReady から始め、router と worker を直接どのようにチェックしているかを調べてください。issue では、router がすぐに応答するにもかかわらず、直接のリクエストが 2 s のタイムアウトまで待つと報告されています。提案されている 2 つのテストケースを確認してください。router は ready だが worker が応答しないケースと、router は失敗するが worker は ready のケースです。チェックが意図した順序に従い、両方のケースが成功すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
After ResumeActor, the controller polls /readyz?check=workspace in checkReady (internal/controller/reconciler.go). It tries http://<workerIP>:80 first and only then the atenet router. The direct check cannot succeed. Substrate gives each worker pool a NetworkPolicy that accepts connections only from the atenet router (cmd/atecontroller/internal/controllers/networkpolicy_controller.go in Substrate), so the controller's packets are dropped. On my kind lab with Substrate main c4129c9 the request therefore waits for the full 2 s httpClient timeout, and the router check that follows answers 200 in about 15 ms. So the first resume of every task spends 2 s on a request that cannot succeed.
I checked both paths from a pod in the cluster with the same headers the controller uses. From the ax-system namespace every port of the worker pod times out, and the policy that does it is substrate-ax-workers-*.
direct http://<workerIP>:80/readyz?check=workspace -> no answer after 5 s
router http://atenet-router.ate-system.svc.cluster.local:80 -> 200 in 0.015 s
(ate-target-actor: default/<actor>)
I swapped the order in a fork, so the router goes first when ATENET_ROUTER_ADDR is set. Only a router 200 ends the check. Any other result still goes on to the direct check, as now. It touches checkReady only, plus a test with two cases, a ready router with a worker that never answers, and a failing router with a ready worker. The first case fails with the current order. Over 5 small tasks each, resume went from 2.19 s to 0.17 s and the whole task from 3.85 s to 2.06 s (medians). Suspend and resume of 512 MiB and 2 GiB workspaces and a chaos run with 8 tasks still pass.
The change is at https://github.com/eren23/ax/compare/a3ad2af...1db4c33
This is separate from #387, which is about old Substrate releases that reject the router Host. Here the router answers fine and the time goes to the direct check before it.
- 主要言語
- Go
- スター
- 14.8k
- フォーク
- 802
- 平均マージ
- 18時間 37分
- マージ済み PR(30日)
- 110
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
google/ax のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
telemetry: move internal/axattr to internal/telemetry/attr対応中かも @rakyll が 1 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
google/ax#684 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
docs/runner.md says suspend sends SIGTERM, but suspend freezes the sandbox without any signal対応中かも @erain が 41 日前に担当しました。 オープンdevx
難易度 1/5 1〜3時間 初心者へのやさしさ 78/100
google/ax#451 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
ax watch hangs forever on a task that doesn't exist再び着手できるかも @erain が 41 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
google/ax#435 · コメント 2 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
似ている issue
-
Sign-off cards drift between formats; write down one card format対応中かも @keyxmakerx が今日担当しました。 オープンdocumentation
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
keyxmakerx/Chronicle#2795 ·
メンテナーはふだん 1 日以内に返信
-
bug enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 2 日以内に返信
-
enhancement good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
refactor review: high
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
1lck/Lithe-IDEA#2376 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
OneBusAway/vehicle-positions#614 ·
メンテナーはふだん 1 日以内に返信