Skip to content

feat: refuse to run on a runtime-overlay-managed image#112

Merged
d4rken merged 2 commits into
devfrom
feat/overlay-managed-guard
May 28, 2026
Merged

feat: refuse to run on a runtime-overlay-managed image#112
d4rken merged 2 commits into
devfrom
feat/overlay-managed-guard

Conversation

@d4rken

@d4rken d4rken commented May 28, 2026

Copy link
Copy Markdown
Member

The new airplanes-live image delivers feed scripts and binaries (apl-feed, the airplanes-feed/mlat daemon wrappers, the readsb feed client, the mlat-client venv, the systemd units) as symlinks owned by a runtime overlay rather than as real files installed by this script. An operator who SSHs onto such a feeder and runs install.sh or update.sh would replace those symlinks with stale real files and break the next overlay update.

install.sh and update.sh now refuse to run on a system where the runtime-overlay manifest is present under /etc/airplanes, exiting 78 (EX_CONFIG) with a message explaining how to update an overlay-managed feeder. AIRPLANES_BUILD_MODE=1 and AIRPLANES_ALLOW_OVERLAY_BYPASS=1 skip the guard for image-build orchestration and operator recovery respectively.

The mounted image upgrade (new contract) CI job is realigned in the same PR: its previous body pre-dated the runtime-overlay refactor and was crashing on a symlink mkdir during setup. It now mounts the new image's rootfs and asserts the guard refuses with exit 78 — a positive end-to-end verification against a real overlay-managed image.

Adds airplanes_guard_overlay_managed_root, called early from install.sh and update.sh, which aborts (EX_CONFIG / 78) when the airplanes runtime-overlay manifest is present. Avoids stomping overlay-owned symlinks (apl-feed, airplanes-feed/mlat, readsb feed client, mlat-client venv) when an operator runs the upstream installer on an image-managed feeder.

AIRPLANES_BUILD_MODE=1 and AIRPLANES_ALLOW_OVERLAY_BYPASS=1 skip the guard for image-build orchestration and recovery.
@d4rken d4rken added the enhancement New feature or request label May 28, 2026
The previous new-contract variant pre-dated the airplanes-live/image runtime-overlay refactor and was crashing in test setup (mkdir on a symlink). Rewrite the new-contract path to mount the overlay-managed image rootfs, sanity-check the runtime-overlay marker, and assert feed/update.sh exits 78 with the overlay-aware message.
@d4rken d4rken merged commit 7d44d4a into dev May 28, 2026
13 checks passed
@d4rken d4rken deleted the feat/overlay-managed-guard branch May 28, 2026 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant