Relax check_panel_memory actor's check #81
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
check_panel_memory
actor is intended to inhibit upgrades when the system lacks the memory needed to satisfy minimum system requirements for CloudLinux 8, which may vary depending on whether a control panel is installed. However, the actor is using the value for total memory as reported by the kernel, rather than the nominal amount of memory actually installed on the system. Since the kernel subtracts its own memory usage from this total, a nominally minimum-spec machine will always fail this check, something which does not appear to be intended. To address this, credit the machine with a certain amount of additional memory when performing the check. (This credited amount will not appear in the message if the check still fails.)A limited number of observations showed that the total is around 50-75 MiB when installed memory is 2 GiB. As a reasonable middle ground, I have preliminarily set the credit to 96 MiB, in case additional kernel features are in use which might add to this total. That said, one common kernel feature which reserves a lot of memory is the
crashkernel
feature. Acrashkernel=auto
entry on the kernel command line can by itself use over a hundred MiB, and it may be useful for the check to test for this and notify the user that disabling this might be worthwhile.