-
Notifications
You must be signed in to change notification settings - Fork 8k
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
[Fleet] Fix managed agent policy preconfiguration update #181624
Conversation
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
/ci |
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]
To update your PR or re-run it, just comment with: cc @nchaulet |
Pinging @elastic/fleet (Team:Fleet) |
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.
I think it would be good to flag this as a fix in release notes.
Is the |
@juliaElastic I think nothing should prevent to set |
) (cherry picked from commit 4d674b1)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
) (#181699) # Backport This will backport the following commits from `main` to `8.14`: - [[Fleet] Fix managed agent policy preconfiguration update (#181624)](#181624) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Nicolas Chaulet","email":"nicolas.chaulet@elastic.co"},"sourceCommit":{"committedDate":"2024-04-25T11:28:22Z","message":"[Fleet] Fix managed agent policy preconfiguration update (#181624)","sha":"4d674b14cdfb7d9039bfa1c389701ba9ef1987a3","branchLabelMapping":{"^v8.15.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix","Team:Fleet","backport:prev-minor","v8.15.0"],"title":"[Fleet] Fix managed agent policy preconfiguration update","number":181624,"url":"#181624 Fix managed agent policy preconfiguration update (#181624)","sha":"4d674b14cdfb7d9039bfa1c389701ba9ef1987a3"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.15.0","branchLabelMappingKey":"^v8.15.0$","isSourceBranch":true,"state":"MERGED","url":"#181624 Fix managed agent policy preconfiguration update (#181624)","sha":"4d674b14cdfb7d9039bfa1c389701ba9ef1987a3"}}]}] BACKPORT--> Co-authored-by: Nicolas Chaulet <nicolas.chaulet@elastic.co>
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
) (cherry picked from commit 4d674b1) # Conflicts: # x-pack/plugins/fleet/common/types/models/agent_policy.ts
Summary
Managed agent policy defined in the kibana config should be updated, if there is a change in the kibana config. It seems if the saved object for that agent policy is out-of-sync and do not have the
is_managed
attribute correctly set we never update them. (This is causing some bug like with thekeep_monitoring_alive
flag added in 8.12).That PR fix that by using the policy defined in the config and not the SO as source of truth.
Tests
Automated
I added unit test to the preconfiguration service
Manual
You can start kibana locally with the following config
Than update it to add
is_managed
andkeep_monitoring_alive
and verify your policy contains these fieldsQuestions
Should we add a release note for that?