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

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

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

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

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
55/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
csharp, docker

調査の方向性

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.

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

説明

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.

主要言語
C#
スター
634
フォーク
206
平均マージ
1日 10時間
マージ済み PR(30日)
104

環境構築

Codespaces で開く

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

はじめの一歩

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

CommunityToolkit/Aspire のほかの issue

CommunityToolkit/Aspire の issue をすべて見る

似ている issue

C# の issue をもっと見る

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

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