Cert hot-reload misses Kubernetes projected-volume (`..data` symlink-swap) rotations
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
Direzione di ricerca
Inizia leggendo l’implementazione standalone di hot-reload di symphony-server introdotta in #14, concentrandoti sul monitoraggio della directory padre, sul filtraggio per nome base e sulla riconciliazione con debounce. Confronta le opzioni proposte per gestire lo scambio del symlink e verifica il comportamento scelto rispetto alle rotazioni dei volumi in stile Kubernetes e agli aggiornamenti diretti dei file esistenti. Il lavoro è completato quando una rotazione di ..data in stile Kubernetes attiva il ricaricamento del certificato senza compromettere il filtraggio attuale o il comportamento di debounce.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Rust
- Stelle
- 1
- Fork
- 0
- Merge medio
- 19h 12m
- PR unite (30g)
- 13
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di HarperFast/symphony
-
Don't route to a restarted upstream until it serves, not just acceptsForse già presa @kriszyp l’ha presa 5 giorni fa. Aperta
HarperFast/symphony#84 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Forward to a peer when the local upstream connect fails on a TLS-terminating failover routeForse già presa @kriszyp l’ha presa 5 giorni fa. Aperta
HarperFast/symphony#83 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
HarperFast/symphony#80 ·
I maintainer di solito rispondono entro 1 giorno
-
Forward a connection to a peer when its local upstream connect failsForse già presa @kriszyp l’ha presa 5 giorni fa. Aperta
HarperFast/symphony#79 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
HarperFast/symphony#77 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di HarperFast/symphony
Issue simili
-
area: cli kind:docs priority: P3
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
swc-project/swc-ai-issues#164 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
pop-os/cosmic-player#367 ·
-
good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
servo/rust-smallvec#873 ·