zram/overlayfs: reliable swap init and image-owned init-script refresh - #254
zram/overlayfs: reliable swap init and image-owned init-script refresh#254pdscomp wants to merge 2 commits into
Conversation
Feedback from @suchmememanyskill
|
|
✅ Build ArtifactsBranch:
|
ValidationRan All cases passed:
Result: On-machine testing will be next once a formal PR build is complete. |
Replace the one-shot zram setup in meta-opencentauri/recipes-core/zram/files/init with an idempotent initializer that waits for and verifies active swap, retries transient setup failures, configures zram deterministically, logs failures, and handles stop/restart safely. Add meta-opencentauri/recipes-core/zram/tests/init-test.sh with host-side coverage for successful startup, idempotence, transient recovery, and bounded permanent failure. Update meta-opencentauri/images/files/overlayfs-etc-preinit.sh.in to remove overlayfs overrides and whiteouts for Cosmos-provided init scripts while preserving user-provided scripts across upgrades.
On-machine CC1 validationValidated the formal PR-254 build on zram/swap
Service health
The PR is now ready for review and possible merge. |
✅ Build ArtifactsBranch:
|
zram/overlayfs: reliable swap init and image-owned init-script refresh
Split from #252.
Why this PR
This revision greatly simplifies zram initialization compared with the original version of PR #252. It more closely follows the original script from @jamesturton while retaining added logging, comprehensive state and device checks, idempotent behavior, and bounded retry logic (as well as a test case to validate script execution on the host after any updates).
A CC1 boot that fails to bring zram online is the main OOM path during normal load or calibration. The old one-shot zram init could silently continue without swap. Separately, the persistent
/etcoverlay could keep stale package-owned init scripts after an image update, silently defeating runtime fixes.Justification / measurements
Reliability change, not a performance change — no MiB claim.
/dev/zram0in/proc/swaps, retries once via module reload, logs failures.Risk / rollback
Low. Reverts cleanly; worst case is reverting to previous one-shot zram init behavior.