Repository navigation
bug(sandbox): SSH exec hardcodes /bin/bash and breaks BYOC images without Bash #2290
Copy link
Copy link
Closed
Closed
Copy link
Labels
area:sandboxSandbox runtime and isolation workSandbox runtime and isolation workstate:staleInactive item at risk of automatic closure.Inactive item at risk of automatic closure.topic:compatibilityCompatibility-related workCompatibility-related work
Description
Agent Diagnostic
- Loaded the repository's
debug-openshell-cluster,openshell-cli, andcreate-github-issueskills. - Reproduced with OpenShell
v0.0.82using the Kubernetes driver and sidecar topology. - Checked the latest release,
v0.0.83. I did not replace the existing Kubernetes prototype to runtime-test the new release, but verified that both SSH execution paths remain unchanged in thev0.0.83source: - Checked the current
mainbranch and found the same implementation. - Reviewed the
v0.0.83release notes and PR fix(k8s): respect template OPENSHELL_SANDBOX_COMMAND instead of overwriting #1326; neither changes the SSH command shell. - Searched existing issues. The closest matches are:
- feat: support custom sandbox entrypoint command #848 concerns configuring the sandbox startup command in the Kubernetes driver, not the SSH exec shell.
- "No such file or directory" error on sandbox create from another container inside cluster #1849 reports an ENOENT from a containerized CLI while
sandbox execstill works, so it is a different failure.
- The BYOC documentation requires a standard Linux image and a shell, but does not require Bash. It also states that no OpenShell-specific dependencies are required:
https://github.com/NVIDIA/OpenShell/blob/v0.0.83/examples/bring-your-own-container/README.md#L54-L79 - The affected Alpine-based image contains BusyBox
/bin/shbut no/bin/bash. - The Sandbox reaches
Ready, its Kubernetes Pod reaches2/2 Running, and/bin/sh, Node.js, and the application work through directkubectl exec. - Both the initial command after
sandbox createand latersandbox execfail after the SSH channel opens. - Source inspection shows that PTY and non-PTY paths both construct
Command::new("/bin/bash"). Explicitly passing/bin/sh -lc ...does not help because it is still wrapped by the outer/bin/bash -lc. - This remains unresolved without modifying the application image to install Bash or maintaining a custom supervisor.
Description
Actual behavior: BYOC images that provide /bin/sh but not /bin/bash can reach Sandbox Ready, but OpenShell cannot execute the initial command or subsequent sandbox exec commands. The client reports that the exec relay closed before an exit status was returned.
Expected behavior: SSH command execution should not impose an undocumented Bash dependency on otherwise supported standard Linux images. The shell should be configurable or fall back to /bin/sh. If Bash is intentionally mandatory, OpenShell should validate this prerequisite early and return an actionable error.
Reproduction Steps
- Deploy OpenShell with the Kubernetes driver using sidecar topology.
- Create a Sandbox from an Alpine-based application image that has
/bin/shand no/bin/bash. - Confirm that the Sandbox is
Readyand that/bin/shworks throughkubectl exec. - Run:
openshell sandbox exec --name <sandbox> -- /bin/sh -lc 'echo OK'. - Observe that the SSH exec channel closes without reporting an exit status.
- Add
/bin/bashto the same image and repeat; the hard dependency is no longer encountered.
Environment
- OpenShell tested:
v0.0.82 - Latest release checked:
v0.0.83 - Compute driver: Kubernetes, sidecar topology
- Kubernetes:
v1.36.2 - Agent Sandbox Controller:
v0.5.1 - Nodes: Ubuntu 22.04, Linux 6.8, containerd 2.2.1,
linux/amd64 - Application image: Alpine-based; BusyBox
/bin/shpresent,/bin/bashabsent - Possible duplicates checked: feat: support custom sandbox entrypoint command #848, "No such file or directory" error on sandbox create from another container inside cluster #1849, PR fix(k8s): respect template OPENSHELL_SANDBOX_COMMAND instead of overwriting #1326
Logs
$ kubectl exec <sandbox-pod> -c sandbox -- /bin/sh -lc 'echo OK'
OK
$ openshell sandbox exec --name <sandbox> -- /bin/sh -lc 'echo OK'
Error: exec relay closed before the command reported an exit statusAgent-First Checklist
- I pointed my agent at the repo and had it investigate this issue
- I loaded relevant skills (
debug-openshell-cluster,openshell-cli, andcreate-github-issue) - I checked the latest OpenShell release and explained why I did not replace the deployed prototype to runtime-test it
- I searched existing issues for possible duplicates
- My agent could not resolve this without modifying the image or supervisor
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area:sandboxSandbox runtime and isolation workSandbox runtime and isolation workstate:staleInactive item at risk of automatic closure.Inactive item at risk of automatic closure.topic:compatibilityCompatibility-related workCompatibility-related work
Activity
matthewgrossman commentedon Jul 29, 2026
github-actions commentedon Aug 28, 2026
This issue has had no activity for 14 days and is now marked stale. It may be closed in 7 days if there is no further activity. Comment or remove the state:stale label to keep it open.
johntmyers commentedon Sep 17, 2026