Skip to content

Commit 9fa0d0d

Browse files
committed
fix(images): probe supervisor readiness
Signed-off-by: Simon Scatton <sscatton@nvidia.com> (cherry picked from commit 0a7d719165026e3b43c67c9ccbf50d70ea8defb2)
1 parent ea5022e commit 9fa0d0d

3 files changed

Lines changed: 19 additions & 0 deletions

File tree

‎deploy/docker/Dockerfile.supervisor‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,7 @@ COPY --chmod=0555 deploy/docker/.build/prebuilt-binaries/${TARGETARCH}/openshell
1717

1818
USER 65534:65534
1919

20+
HEALTHCHECK --interval=30s --timeout=5s --start-period=60s --retries=3 \
21+
CMD ["/openshell-supervisor", "health", "--socket", "/run/openshell/health.sock"]
22+
2023
ENTRYPOINT ["/openshell-supervisor"]

‎docs/how-it-works/sandboxes/runtimes.mdx‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,14 @@ The supervisor image defaults to UID/GID `65534:65534`, including with a custom
5858
base. Compute drivers select the runtime identity explicitly. For direct image
5959
launches, make mounted runtime and log directories writable by the selected user.
6060

61+
The supervisor image healthcheck connects to `/run/openshell/health.sock`,
62+
which a dedicated supervisor opens only while its sandbox session is ready.
63+
Docker and Podman set their own probes to match the socket they configure;
64+
Kubernetes uses TCP probes instead of the image healthcheck. For direct image
65+
launches, override the healthcheck to match a different readiness socket or
66+
the shared supervisor's TCP health listener. The standalone network-proxy
67+
role does not publish a readiness socket and needs a proxy-specific check.
68+
6169
For TLS-enabled Docker, Podman, and MicroVM gateways, set `guest_tls_ca` in
6270
`[openshell.gateway]` or use the package-managed local CA. Remove the retired
6371
`guest_tls_cert` and `guest_tls_key` fields. Supervisors receive only the

‎skills/debug-openshell-cluster/SKILL.md‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,14 @@ are unavailable. Workload shells belong to the separate sandbox image. Preserve
253253
the driver-selected UID and writable runtime/log mounts when reproducing a
254254
supervisor startup failure.
255255

256+
The image's exec healthcheck uses `/run/openshell/health.sock`. Docker and
257+
Podman override it to match their configured readiness sockets; Kubernetes
258+
uses its own TCP probes. On a direct image launch, check that the image probe
259+
matches `--health-socket-path`; shared mode needs a probe for its configured
260+
TCP health listener, and network-proxy mode needs a proxy-specific check.
261+
The dedicated readiness socket closes when the
262+
supervisor session becomes unready, so a stale socket file is not sufficient.
263+
256264
A `ConfigurationInvalid` readiness condition means startup admission rejected
257265
the image/effective policy or provider configuration. The supervisor remains
258266
alive while the workload stays unstarted. Inspect `openshell sandbox get` and

0 commit comments

Comments
 (0)