feat: refuse to run on a runtime-overlay-managed image#112
Merged
Conversation
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.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.shandupdate.shnow 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=1andAIRPLANES_ALLOW_OVERLAY_BYPASS=1skip 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.