Skip to content

Commit 94f58a4

Browse files
authored
fix(images): probe supervisor readiness (#6020)
* fix(images): probe supervisor readiness Signed-off-by: Simon Scatton <sscatton@nvidia.com> (cherry picked from commit 0a7d719165026e3b43c67c9ccbf50d70ea8defb2) * docs(images): clarify supervisor health probes Signed-off-by: Simon Scatton <sscatton@nvidia.com> --------- Signed-off-by: Simon Scatton <sscatton@nvidia.com>
1 parent fd18472 commit 94f58a4

3 files changed

Lines changed: 23 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: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,16 @@ 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+
A dedicated supervisor opens this socket only when started with
63+
`--health-socket-path=/run/openshell/health.sock` and its sandbox session is ready.
64+
Docker and Podman set their own probes to match the socket they configure;
65+
Kubernetes uses TCP probes instead of the image healthcheck. For direct image
66+
launches using another Unix socket, override the probe's `--socket` argument.
67+
For direct shared-supervisor or network-proxy launches, disable the inherited
68+
check with `docker run --no-healthcheck` and monitor readiness externally.
69+
The shell-free image has no TCP or proxy health-probe command.
70+
6171
For TLS-enabled Docker, Podman, and MicroVM gateways, set `guest_tls_ca` in
6272
`[openshell.gateway]` or use the package-managed local CA. Remove the retired
6373
`guest_tls_cert` and `guest_tls_key` fields. Supervisors receive only the

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,16 @@ 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 the explicitly configured `--health-socket-path`; a dedicated
260+
supervisor does not create a readiness socket unless this flag is set.
261+
For direct shared or network-proxy launches, use `docker run --no-healthcheck`
262+
and monitor readiness externally: the shell-free image's native probe supports
263+
only Unix sockets. The dedicated readiness socket closes when the
264+
supervisor session becomes unready, so a stale socket file is not sufficient.
265+
256266
A `ConfigurationInvalid` readiness condition means startup admission rejected
257267
the image/effective policy or provider configuration. The supervisor remains
258268
alive while the workload stays unstarted. Inspect `openshell sandbox get` and

0 commit comments

Comments
 (0)