Workflow.orbit_dir resolves to non-writable path in containerized environments
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 58/100
Direzione di ricerca
Start in the Workflow model or init where orbit_dir defaults to Path("orbits") and is resolved, then inspect how work_dir is established. Reproduce with CWD=/ and verify that an implicit orbit directory is placed under work_dir while an explicitly supplied path remains unchanged; add regression coverage for the containerized case.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
Workflow.orbit_dir defaults to Path("orbits") and is resolved via Path.resolve() against the process CWD. In containerized environments (Kubernetes pods, Docker containers) where CWD may be / or another read-only path, this resolves to /orbits, causing:
PermissionError: [Errno 13] Permission denied: '/orbits'
Related Upstream Issue
COMPASS: https://github.com/opera-adt/COMPASS/issues/241
The root cause spans both sweets (which sets the default) and COMPASS (which creates the directory). A fix in either project would resolve the issue.
Reproduction
# On a Kubernetes worker pod (CWD=/)
from sweets.core import Workflow
from sweets.download import BurstSearch
wf = Workflow(work_dir="/tmp/insar/event", bbox=(...), search=BurstSearch(...))
print(wf.orbit_dir) # -> /orbits (non-writable)
wf.run()
# -> PermissionError: [Errno 13] Permission denied: '/orbits'
Environment
- sweets version: installed via
sweets-dask-noml-cpu:develop.latestcontainer - Platform: EASI (Kubernetes/EKS), Dask Gateway worker pods
- Observed on: Batch processing of 85 Australian earthquake events via Dask Gateway
Proposed Fix
Resolve orbit_dir relative to work_dir rather than CWD when no explicit path is provided:
# In Workflow model or __init__
if self.orbit_dir is None or self.orbit_dir == Path("orbits"):
self.orbit_dir = self.work_dir / "orbits"
Alternatively, support an environment variable override:
import os
self.orbit_dir = Path(os.environ.get("SWEETS_ORBIT_DIR", self.work_dir / "orbits"))
Workaround
os.chdir(work_dir) before creating the Workflow so that Path("orbits").resolve() points to {work_dir}/orbits. This is fragile in multi-task/concurrent environments (e.g., Dask workers processing multiple events).
Impact
5 out of 21 events that reached geocoding failed with this error during a batch run of 85 earthquake events on Kubernetes. The remaining 64 events were lost to scheduler timeout before reaching this stage.
- Lingua principale
- Python
- Stelle
- 75
- Fork
- 24
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Nessuna 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 isce-framework/sweets
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 88/100
isce-framework/sweets#158 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
isce-framework/sweets#113 · 1 commento ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
isce-framework/sweets#157 · 1 commento ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 62/100
isce-framework/sweets#156 · 2 commenti · 1 reazione ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
isce-framework/sweets#155 · 1 commento ·
Tutte le issue di isce-framework/sweets
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
I maintainer di solito rispondono entro 1 giorno
-
https://search.utilibre.orgApertainstance instance add
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
searxng/searx-instances#941 · 1 commento ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
FluidNumerics/fluid-walk-blocker#89 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno