Skip to content

Commit b5978dc

Browse files
committed
chore(build): remove stale static-supervisor leftovers
The opt-in glibc-static supervisor variant from #2682 is gone: the Nix release builds (#2977) removed it from CI and the supervisor Dockerfile, and the RFC 0012 sandbox split (#2942) removed it from the staging script. The split also moved the binary that runs inside workload images to openshell-sandbox; the supervisor now runs from its own image and is dynamically linked. A few places still describe the old model: - skills/debug-openshell-cluster told operators to check that supervisor_image contains a static /openshell-supervisor. Ask instead for a supervisor from the matching release whose loader and shared libraries are available inside that image, and give a `--version` check that shows both. The static requirement for /openshell-sandbox is unchanged. - verify-static-binary.sh justified its check with the supervisor and the glibc-static variant. Describe the property it enforces instead, with the musl sandbox runtime as the main example. - stage-prebuilt-binaries.sh kept an unreachable gnu-static case in target_triple. No behavior change: resolve_component only ever selects gnu or musl. Signed-off-by: Emilien Macchi <emacchi@redhat.com>
1 parent 96c08f1 commit b5978dc

3 files changed

Lines changed: 9 additions & 10 deletions

File tree

skills/debug-openshell-cluster/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ Common findings:
260260
gateway's primary endpoint is reachable from a host-networked container.
261261
- Sandbox runtime image exits before printing `openshell-sandbox --version`: verify the configured image contains a static executable at `/openshell-sandbox`.
262262
- A sandbox with explicit `protocol: tcp` endpoints fails before workload readiness: confirm the selected isolation backend advertises TCP mediation, then inspect the sandbox and supervisor logs for protected-channel setup or listener failures. A driver that cannot supply the required outer egress fence and authenticated runtime channel must reject the policy before starting the agent.
263-
- Supervisor runtime validation fails: verify `supervisor_image` contains a static `/openshell-supervisor` executable from the same release as the sandbox runtime.
263+
- Supervisor runtime validation fails: verify `supervisor_image` contains an `/openshell-supervisor` executable from the same release as the sandbox runtime, and that the dynamic loader and shared libraries it links against are available inside that image. `docker run --rm --network none --entrypoint /openshell-supervisor <supervisor_image> --version` should print that release; a `no such file or directory` error for a binary that exists means the loader or a library is missing. The supervisor runs from its own image and does not need to be static; only `/openshell-sandbox` must be.
264264
- The sandbox fails its enforcement probe: inspect the sandbox log for the exact nested seccomp user-notification, task-memory, Landlock, loopback DNS, or socket-injection check that failed. Do not add capabilities or switch to an unconfined seccomp profile; use a runtime whose default profile permits the unprivileged probe.
265265
- A GPU sandbox fails because Docker reports no discovered NVIDIA CDI devices: verify `.DiscoveredDevices` contains entries such as `nvidia.com/gpu=all`, verify `/etc/cdi` or `/var/run/cdi` contains a generated NVIDIA spec, and check that `nvidia-cdi-refresh.service` and `nvidia-cdi-refresh.path` from NVIDIA Container Toolkit are enabled and healthy. The service is a one-shot unit, so `inactive (dead)` can be normal after a successful run; use `systemctl status` and `journalctl` to distinguish success from a skipped or failed refresh. Restart `nvidia-cdi-refresh.service` to regenerate missing or stale CDI specs, then restart or reload Docker and re-check `docker info`.
266266

tasks/scripts/stage-prebuilt-binaries.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,7 @@ target_triple() {
2828
local suffix
2929
case "$libc" in
3030
musl) suffix=musl ;;
31-
# gnu-static builds the GNU target with +crt-static, so it shares the
32-
# gnu triple.
33-
gnu|gnu-static) suffix=gnu ;;
31+
gnu) suffix=gnu ;;
3432
*)
3533
echo "unsupported libc: $libc" >&2
3634
exit 1

tasks/scripts/verify-static-binary.sh

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@ set -euo pipefail
66

77
# Verify a binary is a genuine, complete, fully static executable.
88
#
9-
# The supervisor is executed from inside arbitrary sandbox images (Docker
10-
# extraction, Podman image volumes, the Kubernetes copy-self path), so any
11-
# dynamic linkage breaks it on musl-based images and on images whose glibc is
12-
# older than the build host's. Both supported supervisor libc variants (musl
13-
# and glibc-static) must therefore produce a static binary.
9+
# Callers pass binaries that must run without a dynamic loader, such as the
10+
# musl sandbox runtime (openshell-sandbox). It is executed from inside
11+
# arbitrary workload images (Docker extraction, Podman image volumes, the
12+
# Kubernetes copy-self path), so any dynamic linkage breaks it on musl-based
13+
# images and on images whose glibc is older than the build host's. Other
14+
# callers include the release prover and e2e fixtures.
1415
#
1516
# This check exists because the failure is silent: `zig cc` accepts `-static`
1617
# for `*-linux-gnu` targets and emits a dynamically linked binary anyway, so a
@@ -57,7 +58,7 @@ if [[ -z $READELF ]]; then
5758
host_os=""
5859
command -v uname >/dev/null 2>&1 && host_os=$(uname -s 2>/dev/null || true)
5960
# Skip only on a host positively identified as non-Linux — e.g. a macOS dev
60-
# cross-building the Linux supervisor via cargo-zigbuild, where mise installs
61+
# cross-building a Linux musl binary via cargo-zigbuild, where mise installs
6162
# no binutils. Linux (including CI), or any host whose OS cannot be determined,
6263
# fails closed so a missing inspector never silently passes. Static linkage is
6364
# still enforced in CI, which runs on Linux.

0 commit comments

Comments
 (0)