Skip to content

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Mar 18, 2024

Proposed commit message

Heartbeat lockdown measures are triggering /proc/io ownership rules, which end up not being accessible by the agent. This PR introduces a reset on PRCTL_SET_DUMPABLE flag to allow the agent to access heartbeat metrics.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • [ ] I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

How to test this PR locally

  1. Enrol a local agent in a private location policy which contains at least one monitor.
  2. Find PID for heartbeat process: docker exec -u root -it --container name-- ps -aef
  3. Check permissions for /proc/--pid--/io:
//before
docker exec -u root -it vigorous_pike ls -al /proc/70/io
-r-------- 1 root root 0 Mar 12 12:59 /proc/70/io
//after
docker exec -u root -it exciting_spence ls -al /proc/57/io
-r-------- 1 elastic-agent elastic-agent 0 Mar 12 12:52 /proc/57/io
```<hr>This is an automatic backport of pull request #38269 done by [Mergify](https://mergify.com).

Enforce dumpable attribute on heartbeat process for /proc/io to be readable by elastic-agent.

---------

Co-authored-by: Vignesh Shanmugam <[email protected]>
(cherry picked from commit 9c9ae35)
@mergify mergify bot added the backport label Mar 18, 2024
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Mar 18, 2024
@emilioalvap emilioalvap added the Team:obs-ds-hosted-services Label for the Observability Hosted Services team label Mar 18, 2024
@elasticmachine
Copy link
Collaborator

Pinging @elastic/obs-ds-hosted-services (Team:obs-ds-hosted-services)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Mar 18, 2024
@emilioalvap emilioalvap enabled auto-merge (squash) March 18, 2024 13:40
@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2024-03-18T13:24:43.920+0000

  • Duration: 53 min 20 sec

Test stats 🧪

Test Results
Failed 0
Passed 2557
Skipped 28
Total 2585

💚 Flaky test report

Tests succeeded.

🤖 GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@emilioalvap emilioalvap merged commit 590d92c into 8.12 Mar 18, 2024
@emilioalvap emilioalvap deleted the mergify/bp/8.12/pr-38269 branch March 18, 2024 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport Team:obs-ds-hosted-services Label for the Observability Hosted Services team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants