Skip to content
This repository has been archived by the owner on Sep 17, 2024. It is now read-only.

fix: run heartbeat not as uid 1000 #1693

Merged
merged 1 commit into from
Oct 20, 2021

Conversation

mdelapenya
Copy link
Contributor

@mdelapenya mdelapenya commented Oct 20, 2021

What does this PR do?

In the k8s-autodiscover test suite, it sets an env var in heartbeat deployment to not hearbeat process as 1000, returning back to use root.

Why is it important?

I think it's better explained here: elastic/beats#28570

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 run the Unit tests (make unit-test), and they are passing locally
  • I have run the End-2-End tests for the suite I'm working on, and they are passing locally
  • I have noticed new Go dependencies (run make notice in the proper directory)

Author's Checklist

  • @jsoriano, what are the implication of running this pod as root again?

How to test this PR locally

kind delete clusters --all && \
TAGS="heartbeat" TIMEOUT_FACTOR=3 LOG_LEVEL=TRACE DEVELOPER_MODE=true \
GITHUB_CHECK_SHA1=81c38fc4c009348d57c92ae85920aed35297a89e \
ELASTIC_APM_ACTIVE=false make -C e2e/_suites/kubernetes-autodiscover functional-test

Related issues

@mdelapenya mdelapenya self-assigned this Oct 20, 2021
@mdelapenya mdelapenya requested review from a team, ChrsMark, andrewvc, andresrc and jsoriano October 20, 2021 17:26
@mdelapenya mdelapenya added area:test Anything related to the Test automation impact:critical Immediate priority; high value or cost to the product. priority:blocker Work is on-hold for a product team, business is at risk until resolution of issue size:S less than 1 day v7.16.0 k8s labels Oct 20, 2021
@elasticmachine
Copy link
Contributor

💚 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: 2021-10-20T17:26:55.122+0000

  • Duration: 19 min 42 sec

  • Commit: 1eff107

Test stats 🧪

Test Results
Failed 0
Passed 162
Skipped 0
Total 162

💚 Flaky test report

Tests succeeded.

🤖 GitHub comments

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

  • /test : Re-trigger the build.

@andrewvc
Copy link

This is fine as a short term fix, but since the root cause is that heartbeat/uid1000 doesn't have perms to read /etc/heartbeat, the better fix would be changing perms there.

@andrewvc
Copy link

I've opened elastic/beats#28572 to improve this situation in heartbeat, but we should still try to fix the perms on those files.

@EricDavisX EricDavisX marked this pull request as ready for review October 20, 2021 20:35
Copy link
Contributor

@EricDavisX EricDavisX left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok as a temp fix to unblock Beats prs. other follow ups are logged.

@EricDavisX
Copy link
Contributor

I am confirming from Beats side, and merging.

@EricDavisX EricDavisX merged commit a0de339 into elastic:master Oct 20, 2021
mergify bot pushed a commit that referenced this pull request Oct 20, 2021
@andrewvc
Copy link

FYI, I have a permanent fix here:elastic/beats#28577 , we really only need this fix in the agent image. Once this is merged you can consider reverting this PR

mdelapenya added a commit that referenced this pull request Oct 21, 2021
(cherry picked from commit a0de339)

Co-authored-by: Manuel de la Peña <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area:test Anything related to the Test automation impact:critical Immediate priority; high value or cost to the product. k8s priority:blocker Work is on-hold for a product team, business is at risk until resolution of issue size:S less than 1 day v7.16.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants