SeaweedFS with WithDataVolume() fails to start after a quick restart, because it's killed during shutdown

Đang mở
#2,250 3 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
55/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
csharp, docker
Lĩnh vực
infrastructure

Hướng nghiên cứu

The SeaweedFS integration builds the weed server command inside a sh -c script, so start by finding where that command string is assembled and where the container stop timeout is set. Reproduce by running the AppHost with WithDataVolume(), stopping it, and restarting quickly. Done when the integration passes -volume.preStopSeconds=0 (or exposes it as an option) and a quick restart starts cleanly. The unexplained ~15 s first stop is open, so note it rather than solving it.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Problem: with WithDataVolume(), stopping the AppHost and starting it again shortly after can make SeaweedFS fail to start: its index in the data volume is still locked.

Cause:

  1. On shutdown, weed server deliberately waits 10 seconds before stopping its volume server (-volume.preStopSeconds, default 10). That's meant for clusters, where other volume servers take over the traffic.
  2. Aspire stops the container with a 1-second timeout, so SeaweedFS is killed before it has shut down.
  3. The killed process leaves its index locked, and the next start fails.

Reproduction with chrislusf/seaweedfs:4.48, weed server -dir=/data -filer -s3, measuring docker stop:

  • default: 10–25 s to stop cleanly, far longer than the 1-second timeout
  • with -volume.preStopSeconds=0: 0.2 s

Proposed fix: add -volume.preStopSeconds=0 to the weed server command the integration builds, or make it an option. AppHosts can't add it themselves, because the command is built inside a sh -c script.

Note: a brand-new container's first stop still took ~15 s with the flag; we haven't found why.

Ngôn ngữ chính
C#
Star
634
Fork
206
Merge trung bình
1 ngày 10 giờ
Pull request đã merge (30 ngày)
104

Chuẩn bị môi trường

Mở trong Codespaces

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.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của CommunityToolkit/Aspire

Tất cả issue của CommunityToolkit/Aspire

Issue tương tự

Thêm issue về C#

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.