-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cherry-pick #23973 to 7.x: Fix: select default agent policy if no enrollment token provided #24001
Conversation
Pinging @elastic/agent (Team:Agent) |
Pinging @elastic/ingest-management (Team:Ingest Management) |
…stic#23973) * Fix: select default agent policy if no enrollment token provided * Update CHANGELOG (cherry picked from commit e3da3be)
9111e3c
to
a6e6ce4
Compare
/test |
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
Trends 🧪💚 Flaky test reportTests succeeded. Expand to view the summary
Test stats 🧪
|
/packaging |
1 similar comment
/packaging |
/test |
4424b08
to
6810c9d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
backport looks good
E2E errors don't seem to be related. |
Cherry-pick of PR #23973 to 7.x branch. Original message:
What does this PR do?
This PR fixes the non-determinism in agent's policy selection. With this bugfix, the agent will always enroll using the default policy unless the custom enrollment token is selected.
Why is it important?
Currently the enrollment script (Docker) selects the newest policy. It may happen that the selected policy is not active or it is not intended to be used.
Checklist
- [ ] 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 worksCHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.Author's Checklist
How to test this PR locally
Expected:
3. Elastic Agent should be started with Default policy, not the newest one (just added).
Related issues
Use cases
Screenshots
Logs