Open
Conversation
Signed-off-by: kapish <[email protected]>
Signed-off-by: kapish <[email protected]>
Signed-off-by: kapish <[email protected]>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates Linux perf_event_paranoid handling during AgentClient.Setup for Docker/Docker Compose flows, switching from an unconditional sysctl -w call to reading /proc/sys/kernel/perf_event_paranoid first and only writing when a relaxation is needed.
Changes:
- Read
/proc/sys/kernel/perf_event_paranoidand skip updates when it’s already sufficiently relaxed. - Write
2\ndirectly to the procfs sysctl path instead of invoking thesysctlbinary. - Add debug/info/error logging around the sysctl state and update attempt.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: kapish <[email protected]>
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.
Describe the changes that are made
This pull request introduces changes to the
Setupmethod inpkg/platform/http/agent.goto improve how theperf_event_paranoidkernel parameter is managed on Linux systems. The update adds logic to check the current value before attempting to set it, ensuring unnecessary writes are avoided, and provides more detailed logging for debugging and observability.Key improvements to Linux kernel parameter management:
/proc/sys/kernel/perf_event_paranoidand only attempts to update it if necessary, avoiding redundant writes and providing debug output about the current state.fmt.Printlnstatements) have been added to help trace the execution flow, especially in Docker Compose scenarios. [1] [2]Links & References
Closes: https://github.com/keploy/enterprise/issues/1774
What type of PR is this? (check all applicable)
Added e2e test pipeline?
Added comments for hard-to-understand areas?
Added to documentation?
Are there any sample code or steps to test the changes?
Self Review done?
Any relevant screenshots, recordings or logs?
🧠 Semantics for PR Title & Branch Name
Please ensure your PR title and branch name follow the Keploy semantics:
📌 PR Semantics Guide
📌 Branch Semantics Guide
Examples:
fix: patch MongoDB document update bugfeat/#1-login-flow(You may skip mentioning the issue number in the branch name if the change is small and the PR description clearly explains it.)Additional checklist: