Repository navigation
Conversation
|
Could we extend the approach from #3544 to the remaining gateway-to-driver The diagnostic here is useful, but users with long state paths still cannot start the gateway. Please allocate a short, gateway-owned socket directory under Please also cover startup with an overlong |
|
The PR initially focused on giving users a clearer error message. The gateway now creates a private, randomly named directory under /tmp for compute-driver.sock. |
elezar
left a comment
There was a problem hiding this comment.
Maybe a question: Are there other paths where we could expect this to happen? Should we expose a shared check to sanitize these paths?
|
it's all the |
|
Audited source:
|
|
Would the team prefer expanding this PR to cover the other socket paths? I'm thinking of adding shared address validation before filesystem changes or connection retries, and consolidating private short-directory allocation. The validator could live in extension-core and be re-exported from core. VM sandbox sockets would also need compact directory names so long sandbox IDs don’t exceed the limit. Alternatively, I can keep this PR focused and address the broader changes in a follow-up. |
|
This pull request has had no activity for 14 days and is now marked stale. |
|
I've expanded this beyond the original diagnostic. Managed VM sockets now use short, private paths under /tmp, so deep state directories and long sandbox IDs don’t block startup. Other configured OpenShell socket paths get a shared check before filesystem changes or connection retries. |
|
Label |
The gateway can now start with a long VM `state_dir`: its managed driver's control socket lives in a private, randomly named `/tmp` directory owned by the managed process, while persistent state stays in the configured directory. VM sandbox sockets use fixed-length directory names so accepted 128-byte IDs fit. A shared filesystem pathname length check gives configured driver/extension endpoints and OpenShell listeners an error naming the path, its byte length and the platform limit before filesystem preparation or connection retries. Signed-off-by: Shiju <shiju@nvidia.com>
684406c to
789b26b
Compare
Summary
The gateway can now start with a long VM
state_dir: its managed driver's control socket lives in a private, randomly named/tmpdirectory owned by the managed process, while persistent state stays in the configured directory. VM sandbox sockets use fixed-length directory names so accepted 128-byte IDs fit. A shared filesystem pathname length check gives configured driver/extension endpoints and OpenShell listeners an error naming the path, its byte length and the platform limit before filesystem preparation or connection retries.Related Issue
Closes #4178
Changes
openshell_extension_core::unix_socket_path::check, re-exported from core: 107 bytes on Linux and 103 on macOS, excluding the terminating NUL.Temporary directories are cleaned up through normal ownership;
SIGKILLcan leave an unused directory behind. Subsequent launches allocate a fresh private directory.Testing
18 focused tests passed on macOS: shared validator/extension checks; long VM sandbox IDs; public gateway startup with an overlong state directory; cleanup on drop, early exit and cancellation; collision handling; configured driver paths; and standalone VM argument validation. Scoped Clippy passed with warnings denied across all targets of the 11 affected packages, alongside formatting, license-header and shell-syntax checks. Independent local Gator review passed. These checks did not boot a real VM or exercise Linux runtime behavior.
Checklist