Repository navigation
fix(role): treat an unreadable pressure file as no pressure and say the pressure is unknown - #205
Merged
Merged
Conversation
Mearman
force-pushed
the
fix/probe-no-psi
branch
2 times, most recently
from
November 3, 2026 19:14
968cff2 to
ac37a71
Compare
…efuses to read An older kernel built or booted without pressure stall information keeps /proc/pressure/memory and fails every read of it with EOPNOTSUPP; newer ones have no /proc/pressure at all. The probe only checked that the file was readable by its mode, so on such a kernel `check memory` exited on the failed read and every sample logged the read error. A read that fails now gives the sample no pressure reading, as a missing file does.
A host none of whose samples has a pressure reading cannot be over the regrade limit, which needs pressure and a low MemAvailable together, so it was judged by MemAvailable against etcd's quota alone without the status saying so. Its status now lists `memory pressure` in unknown_signals, the log adds "memory pressure unknown" to its verdict, and figures carry the window's worst pressure as psi_avg300_max. The verdict itself is unchanged: the missing reading withholds nothing.
Mearman
force-pushed
the
fix/probe-no-psi
branch
from
November 3, 2026 19:48
ac37a71 to
85930cf
Compare
Mearman
marked this pull request as ready for review
November 3, 2026 20:15
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
This security review couldn’t start because the paying account has exhausted its Codex allowance and has insufficient available credits. The payer can check their balance and add credits in the Codex usage dashboard, then try again. If you do not manage the paying account, contact this repository's admins. |
|
🎉 This PR is included in version 2.31.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
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.
A kernel without pressure stall information either has no
/proc/pressure(built or booted without it, on kernels that create the files only when PSI is on) or, on older kernels, keeps/proc/pressure/memoryand fails every read withEOPNOTSUPP(psi_proc_initcreates the files unconditionally in v5.4 and onlyif (psi_enable)from v5.15, whilepsi_showreturns-EOPNOTSUPPwhen PSI is disabled: v5.4, v5.15). The probe already handled the first; on the second it only checked that the file was readable by its mode, socheck memoryexited on the failed read and every sample logged the error. A failed read is now the same as no file.The controller already counted a host with no pressure readings as not over the regrade limit, since that limit needs pressure and a low
MemAvailabletogether, but its status gave no sign that pressure had not been judged. A host none of whose window has a pressure reading now listsmemory pressureinunknown_signals, the log addsmemory pressure unknownto its verdict, andfigures.psi_avg300_maxgives the window's worst pressure (nullthen). The verdict is unchanged:MemAvailableis still held to etcd's storage quota, and the missing reading withholds nothing.Tests: the probe's sample and
check memoryagainst/proc/self/mem, which stands in for a pressure file that exists, is readable by its mode and fails a read (both fail on the previous probe, run on a Linux host), and the controller's status and log for a host with and without pressure readings, including one still failed byMemAvailableunder the quota (that test fails withunknown_signalsbroken).Refs #184