feat(gateway): make launched-driver detection non-blocking
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 55/100
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- Rust
- Sterne
- 21.5k
- Forks
- 2.1k
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus NVIDIA/OpenShell
-
state:triage-needed
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 86/100
-
state:triage-needed
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
-
bug: Ready=False/PodTerminating is treated as a terminal sandbox failureEvtl. vergeben @TaylorMutch hat das vor 9 Tagen übernommen. Offenstate:accepted state:pr-opened
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
-
state:triage-needed
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 78/100
-
state:triage-needed
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
Alle Issues in NVIDIA/OpenShell
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
Maintainer antworten meist innerhalb von 2 Tagen
-
autofixer: follow-up
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
tursodatabase/turso#12531 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug help wanted ui
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
userFRM/egui-charts#4292 ·
Maintainer antworten meist innerhalb von 1 Tag
-
CHANGELOG.md out of dateOffenIssue-Bug Need-Review
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 85/100
PowerShell/DSC#1832 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
Maintainer antworten meist innerhalb von 1 Tag