feat(gateway): make launched-driver detection non-blocking
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Accessibilité débutants
- 55/100
Piste de recherche
Start in crates/openshell-server/src/cli.rs, where run_cli calls prepare_server_config_with_drivers synchronously from async code, then follow the call into launcher::start, which polls with std:🧵:sleep for up to 30 seconds per candidate. Move that blocking work off the runtime with spawn_blocking or an async start path, and document the detection timeout separately from the explicit-launch timeout. Done means a test where a driver never binds its socket shows detection failing within the documented bound without holding a Tokio worker.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
User Story
I run the gateway with launched compute drivers (Docker, Podman, VM) and rely on auto-detection when no driver is named. I directly encountered, while reviewing the launcher, that detection blocks a runtime thread while it waits for a driver to start. This affects how long the gateway takes to fail when a driver hangs.
Problem Statement
Auto-detection runs inside prepare_server_config_with_drivers, which run_cli calls synchronously from async code (crates/openshell-server/src/cli.rs). For each candidate, launcher::start spawns the driver and polls with std::thread::sleep until the driver binds its socket or exits, with a 30 second timeout per candidate. A driver that hangs before binding blocks the calling runtime thread for up to 30 seconds, one candidate at a time.
Impact / Why This Matters
At startup nothing else is served yet, so the effect is a slower failure, not a stall of other work. The same pattern existed for Podman before the launcher change: socket discovery ran synchronously and polled podman info for up to 5 seconds. The launcher change raised the worst case to 30 seconds per candidate. Making detection non-blocking would remove a surprising blocking call from async code and make the timeout a deliberate choice.
Desired Workflow
Detection does not block a runtime thread. The gateway starts each candidate without holding a runtime worker, and the detection timeout is chosen deliberately, separately from the timeout for an explicitly selected driver. Success: a hanging driver delays startup by a bounded, documented time and never blocks a runtime worker.
Acceptance Criteria
- Detection runs without blocking a Tokio worker, for example through
spawn_blockingor an async start path. - The detection timeout is documented, and an explicit launch keeps its own timeout.
- A test covers a driver that never binds its socket.
Related: #5384, #5385. Deferred from the launcher PR to keep that change free of new behaviour.
- Langage dominant
- Rust
- Étoiles
- 21.5k
- Forks
- 2.1k
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de NVIDIA/OpenShell
-
state:triage-needed
Difficulté 2/5 1-3 heures Accessibilité débutants 86/100
-
state:triage-needed
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
-
bug: Ready=False/PodTerminating is treated as a terminal sandbox failurePeut-être pris @TaylorMutch l’a pris il y a 9 jours. Ouvertestate:accepted state:pr-opened
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
-
state:triage-needed
Difficulté 1/5 1-3 heures Accessibilité débutants 78/100
-
state:triage-needed
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100
Toutes les issues de NVIDIA/OpenShell
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
Les mainteneurs répondent en général sous 2 jours
-
autofixer: follow-up
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
tursodatabase/turso#12531 ·
Les mainteneurs répondent en général sous 1 jour
-
bug help wanted ui
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
userFRM/egui-charts#4292 ·
Les mainteneurs répondent en général sous 1 jour
-
CHANGELOG.md out of dateOuverteIssue-Bug Need-Review
Difficulté 1/5 1-3 heures Accessibilité débutants 85/100
PowerShell/DSC#1832 ·
Les mainteneurs répondent en général sous 1 jour
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
Les mainteneurs répondent en général sous 1 jour