Fix excessive reads of /proc/mounts - #620
Conversation
|
Created a couple of file resources with: On Rocky Linux 9.8 node with SELinux enabled temporarily applied the changes locally to Before it resulted in |
770ed26 to
e1cfb70
Compare
|
Fix Windows tests, confirmed working in a Windows 2025 VM with Ruby 4.0. |
3dcb0d4 to
f860efa
Compare
|
@jenxie All tests are passing. Could you squash the 3 commits into a single commit? I'll try to get some more feedback in the mean time. |
Signed-off-by: jenxie <32846807+jenxie@users.noreply.github.com> Co-authored-by: Gemini <noreply@google.com>
f860efa to
c9c9de6
Compare
Done |
|
@jenxie TY for your contribution. |
|
Successfully created backport PR for |
Short description
Optimizes
read_mountsinPuppet::Util::SELinuxby caching the parsed mount data usingFile.mtime('/proc/mounts'). This avoids reading the file thousands of times during a single catalog application.Also includes a unit test to validate the caching behavior.
Fixes #619
Used Gemini to help debug the initial Ruby class variable state and structure the RSpec memoization test. All changes were manually verified and tested locally.
Checklist
I have:
Signed-off-byannotation to each of my commitsGenerated-byorAssisted-byannotations to each of my commits created with the help of an AI agent