Container runtime is reported unhealthy when `docker --version` takes longer than 2 seconds
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 25/100
Hướng nghiên cứu
Start with dockerVersionCommandTimeout in internal/docker/cli_orchestrator.go, where the 2-second limit on docker --version is applied, then follow how a timeout turns into Running: false. The RuntimeUnhealthy transition is in controllers/container_controller.go, and the NetworkReconciler retry is the log line to match. The issue does not settle the fix, since the options are still open in microsoft/aspire#19570, so agree the intended behaviour with maintainers first. Done means a timeout no longer marks the runtime unhealthy under the agreed rule, with tests covering the slow-command case.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
DCP considers the container runtime unhealthy when docker --version does not finish within 2 seconds (dockerVersionCommandTimeout in internal/docker/cli_orchestrator.go, unchanged on main). A container that is reconciled in that window goes to RuntimeUnhealthy (controllers/container_controller.go). @flojon analyzed this, with a deterministic reproduction, in microsoft/aspire#19570. I found no issue for it in this repository, so this adds the DCP side and data from another platform.
Environment: GitHub-hosted macOS Intel runner (4 vCPU), Docker engine in a Lima/QEMU VM, DCP 0.26.5 (Aspire 13.6.1).
Observed (logs)
-
The DCP debug logs of 25 CI sessions contain 714 runs of
docker --version: median 0.06 s, 95th percentile 0.64 s, 3 over 2 s (maximum 2.37 s). -
One session (passed) shows the sequence:
15:47:56.318 Running Docker command ... docker --version 15:47:56.951 Process started successfully (0.63 s after the command was issued) 15:47:58.321 Context expired, stopping process... (the 2 s limit) 15:47:59.752 NetworkReconciler: Container runtime is not healthy, retrying reconciliation later... -
In 3 of the 25 sessions DCP logged "Container runtime is not healthy", each time for the container network, which DCP retried (the tests passed). In none of them did a container reach
RuntimeUnhealthy. -
In two earlier CI runs of one sample (no DCP log was captured), a container went from
StartingtoRuntimeUnhealthyafter 0.2 s and 1.8 s, and everything that waited for it failed immediately.
Assumed (not shown)
- That those two failures were caused by this check. The signature matches, but I do not know which command failed.
- That the three slow calls belong to the three sessions where the runtime was reported unhealthy; I did not match them.
Suggestion
One of the options already listed in microsoft/aspire#19570, for example treating a --version timeout as "version unknown" instead of "not running", or retrying once before reporting Running: false.
- Ngôn ngữ chính
- Go
- Star
- 192
- Fork
- 27
- Merge trung bình
- 2 ngày 2 giờ
- Pull request đã merge (30 ngày)
- 30
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của microsoft/dcp
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
ContainerVolume stuck in PendingCó thể đã có người làm @danegsta đã nhận 1 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Add application iconĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của microsoft/dcp
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement tariffs
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
evcc-io/evcc#35698 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày