Ensure an 8G swap file for OOM resilience - #118
Merged
Merged
Conversation
TheJJ
requested changes
Sep 9, 2026
TheJJ
left a comment
Member
There was a problem hiding this comment.
i think the llm didn't think this through very well - needs some changes for robustness and proper error output/handling.
TheJJ
reviewed
Sep 9, 2026
cpaelzer
force-pushed
the
add-swap-permanently
branch
from
September 9, 2026 15:01
3957c18 to
a84ad6e
Compare
Report generation can be memory hungry and the units occasionally ran out of memory. As an emergency measure swap was added manually on the affected system; this formalizes that setup in the charm itself. On install, re-deploy and charm upgrade alike, _ensure_swap() now guarantees an 8G /swapfile.swp on the root filesystem (the detachable charm storage must not hold swap): An existing swapfile is kept as-is and only ensured to be active. Any failure (e.g. insufficient disk space) blocks the unit visibly via the existing install error handling. Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
cpaelzer
force-pushed
the
add-swap-permanently
branch
from
September 9, 2026 16:17
a84ad6e to
04d0429
Compare
TheJJ
approved these changes
Sep 10, 2026
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.
Report generation can be memory hungry and the units occasionally ran out of memory. As an emergency measure swap was added manually on the affected system; this formalizes that setup in the charm itself.
On install, re-deploy and charm upgrade alike, _ensure_swap() now guarantees an 8G /swapfile.swp on the root filesystem (the detachable charm storage must not hold swap):
An existing swapfile is kept as-is and only ensured to be active.
Any failure (e.g. insufficient disk space) blocks the unit visibly via the existing install error handling.