Cert hot-reload misses Kubernetes projected-volume (`..data` symlink-swap) rotations
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 48/100
調査の方向性
#14 で導入された symphony-server の独立した hot-reload 実装を読み始め、親ディレクトリの監視、ベース名によるフィルタリング、debounce された reconcile に注目してください。提案されている symlink-swap の処理方法を比較し、選択した動作を Kubernetes スタイルのボリュームローテーションおよび既存の直接的なファイル更新に照らして検証してください。Kubernetes 形式の ..data ローテーションによって証明書のリロードが発生し、現在のフィルタリングや debounce の動作を壊さないことが完了の条件です。
索引モデルが issue の本文から書いたものです。
説明
Background
@harperfast/[email protected] (#14) added live cert-file hot-reload to the standalone symphony-server: it watches the parent directories of the cert/key files referenced by the config and, on a change event, filters by the referenced basename (certFilesByDir.get(dir)?.has(filename)) before triggering a debounced reconcile.
Limitation
Basename filtering handles in-place writes and renames of the real files — which is what host-manager does (writes keys/fullchain.pem / keys/privkey.pem directly). It does not handle rotation performed by swapping a symlinked directory, which is how several common environments rotate certs:
- Kubernetes Secret / projected volumes (and cert-manager) update a mount atomically by writing a new timestamped dir (
..2026_07_06_...) and re-pointing the..datasymlink. The watched directory seesrenameevents for..data/..2026_*, none of which match the configured basename (e.g.tls.crt), so they're filtered out and no reconcile fires. - Let's Encrypt
live/symlinks can hit the same shape depending on how the symlink is replaced.
Net: in a symlink-swap deployment the hot-reload silently no-ops, and symphony keeps serving the old cert until a restart or an unrelated config write. (Per-route KeyMismatch isolation and last-good carry-forward from #14 still hold — this is purely about noticing the rotation.)
Possible fixes
- Resolve symlinks (
fs.realpathSync) and watch the real target directory, re-resolving on each reconcile. - When the watched dir contains a
..data-style symlink, don't drop unmatched rename events — let them through to the debounced reconcile (it's already coalesced + cheap). - A periodic re-stat fallback (compare mtime/inode of referenced files) as a backstop for watchers that miss events.
Option 2 is the smallest; option 1 is the most general. Both should stay bounded (dedup by dir, existing debounce).
Priority
Low for the current deployment model (host-manager writes real files in place, which works today). Relevant if symphony is ever run under Kubernetes projected volumes / cert-manager.
Filed as a follow-up to #14. Issue text generated by an LLM (Claude Opus 4.8) on Kris's behalf.
- 主要言語
- Rust
- スター
- 1
- フォーク
- 0
- 平均マージ
- 19時間 12分
- マージ済み PR(30日)
- 13
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
HarperFast/symphony のほかの issue
-
Don't route to a restarted upstream until it serves, not just accepts対応中かも @kriszyp が 5 日前に担当しました。 オープン
HarperFast/symphony#84 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
Forward to a peer when the local upstream connect fails on a TLS-terminating failover route対応中かも @kriszyp が 5 日前に担当しました。 オープン
HarperFast/symphony#83 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
HarperFast/symphony#80 ·
メンテナーはふだん 1 日以内に返信
-
Forward a connection to a peer when its local upstream connect fails対応中かも @kriszyp が 5 日前に担当しました。 オープン
HarperFast/symphony#79 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
HarperFast/symphony#77 ·
メンテナーはふだん 1 日以内に返信
HarperFast/symphony の issue をすべて見る
似ている issue
-
area: cli kind:docs priority: P3
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
swc-project/swc-ai-issues#164 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
pop-os/cosmic-player#367 ·
-
good first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
servo/rust-smallvec#873 ·