feat(gateway): handle launched-driver socket paths that exceed the Unix socket limit

Ouverte
#5,935 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Évaluation

Difficulté
3/5
Temps estimé
1-2 jours
Accessibilité débutants
55/100
Type d'issue
Fonctionnalité
Clarté
Plutôt claire
Activité
Active
Stack technique
rust
Domaine
backend

Piste de recherche

Start where the gateway binds each launched driver's socket under $XDG_STATE_HOME/openshell/run/launch-XXXXXX/driver.sock, and compare it with the VM driver's existing over-long per-sandbox socket check. Decide between an explicit length error and a private /tmp/openshell-<uid> fallback, then add a unit test that uses a long base directory. Done means a long state directory no longer yields a bare SUN_LEN bind error and any fallback warning names the location.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

area:drivers

User Story

I use OpenShell with launched compute drivers (Docker, Podman, VM) and run the gateway under state directories of varying depth, including CI workspaces. I directly encountered the gateway failing to start a driver because its socket path was too long. This affects whether the gateway starts at all.

Problem Statement

The gateway binds each launched driver's Unix socket under $XDG_STATE_HOME/openshell/run/launch-XXXXXX/driver.sock. A Unix socket path is limited to about 104 bytes on Linux and macOS. When the state directory is deep, the driver fails to bind with path must be shorter than SUN_LEN and the gateway does not start. The gateway does not check the length and has no way to recover.

Impact / Why This Matters

Operators with long XDG_STATE_HOME values, such as CI workspaces or per-user directories on shared hosts, get an opaque bind error. Their workaround is to choose a shorter state directory. The VM driver already rejects over-long per-sandbox socket paths with an explicit error, so behaviour is inconsistent.

Desired Workflow

The gateway checks the socket path length before it starts a driver. When the path would be too long, it either names the cause and the fix in the error, or places the launch directory under a short private location such as /tmp/openshell-<uid> (owner-only, checked as the existing socket directory is) and logs a warning. Success: a long state directory never produces a bare SUN_LEN bind error.

Acceptance Criteria

  • A state directory long enough to exceed the socket path limit does not produce a bare bind error.
  • If a fallback location is used, it is private to the gateway's user and the warning names it.
  • A unit test covers a long base directory.

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

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de NVIDIA/OpenShell

Toutes les issues de NVIDIA/OpenShell

Issues similaires

Plus d'issues Rust

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.