Skip to content

fix: don't abort install.sh when the OpenShell gateway health-check fails - #26

Merged
vyncint merged 1 commit into
mainfrom
fix/install-openshell-healthcheck-abort
Aug 2, 2026
Merged

fix: don't abort install.sh when the OpenShell gateway health-check fails#26
vyncint merged 1 commit into
mainfrom
fix/install-openshell-healthcheck-abort

Conversation

@vyncint

@vyncint vyncint commented Aug 2, 2026

Copy link
Copy Markdown
Owner

The bug

install.sh runs check_openshell before it installs the driver and runs setup:

main() { … check_openshell; resolve_version; install_driver; maybe_setup; }

check_openshell shells out to NVIDIA's official OpenShell installer, which starts and health-checks the gateway. But that gateway can't become reachable until this driver's setup wires a compute driver into it — which happens two steps later. So the OpenShell installer exits non-zero (local gateway listener did not become reachable within 30s), and because install.sh runs under set -eu, that aborts the whole script before setup ever runs.

Result of a fresh curl … | install.sh | sh: apple/container and OpenShell get installed, but the driver is never set up. The gateway then crash-loops (no compute driver configured / failed to connect to /tmp/oshl-ac/driver.sock) — exactly the broken state a fresh install just produced on my machine.

The fix

Tolerate the OpenShell installer's expected non-zero exit, but assert the binary actually installed, then let the script continue to install_drivermaybe_setup:

-       curl -LsSf "$OPENSHELL_INSTALL_URL" | sh
+       curl -LsSf "$OPENSHELL_INSTALL_URL" | sh || true
+       need openshell || err "OpenShell installation failed"

setup brings the gateway up at the end (it's idempotent and also repairs the CLI's gateway registration). A genuine OpenShell install failure is still caught — need openshell fails and we err out.

Verification

  • sh -n install.sh parses; shellcheck clean (same set the CI job lints).
  • Root cause reproduced live on a real machine: a fresh curl … | sh left the gateway crash-looping with no compute driver configured; running openshell-driver-applecontainer setup by hand fixed it completely (gateway Connected, sandbox create → Ready → exec uname -a returns Linux … 6.18.15 aarch64). This PR removes the need for that manual step.

…ails

install.sh installs OpenShell before it installs this driver and runs
`setup`. The OpenShell installer starts and health-checks its gateway,
which cannot become reachable until `setup` wires in the compute driver
afterwards — so it exits non-zero ("local gateway listener did not become
reachable within 30s"). Under `set -eu` that aborted the whole script,
leaving OpenShell and apple/container installed but the driver never set
up: the gateway then crash-loops with "no compute driver configured".

Tolerate the expected non-zero exit from the OpenShell installer and
assert the `openshell` binary actually landed instead, then continue on
to install the driver and run `setup`, which brings the gateway up.

Signed-off-by: Vyncint Ng <vyncint@users.noreply.github.com>
@vyncint
vyncint merged commit 10b4625 into main Aug 2, 2026
22 checks passed
@vyncint
vyncint deleted the fix/install-openshell-healthcheck-abort branch August 2, 2026 13:30
vyncint added a commit that referenced this pull request Aug 2, 2026
update/cleanup lifecycle subcommands (#27) and the install.sh OpenShell
health-check abort fix (#26).

Signed-off-by: Vyncint Ng <vyncint@users.noreply.github.com>
Co-authored-by: Vyncint Ng <vyncint@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant