Skip to content
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 fleet server host removal from managed policies #195377

Merged
merged 1 commit into from
Oct 8, 2024

Conversation

nchaulet
Copy link
Member

@nchaulet nchaulet commented Oct 8, 2024

Summary

Resolve #193407

That PR allow to remove a fleet server host that was used in a managed agent policies, it was previously failing due to missing force flag, that we use for all operation from the preconfiguration.

Screenshot 2024-10-08 at 12 18 20 PM

How to test

You can add then remove the following to your kibana config

xpack.fleet.fleetServerHosts:
  - id: default-fleet-server
    name: Default Fleet server
    is_default: true
    host_urls: ['https://fleetserver:8220']
  - id: test1
    name: test1
    is_default: false
    host_urls: ['https://fleetserver:8220']

xpack.fleet.agentPolicies:
  - name: Test policy
    description: TEST
    id: test-policy
    is_default: false
    is_managed: true
    is_default_fleet_server: false
    package_policies: []
    fleet_server_host_id: test1

@nchaulet nchaulet added release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) v8.16.0 labels Oct 8, 2024
@nchaulet nchaulet self-assigned this Oct 8, 2024
@nchaulet nchaulet requested a review from a team as a code owner October 8, 2024 10:14
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

Copy link
Contributor

@juliaElastic juliaElastic left a comment

Choose a reason for hiding this comment

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

LGTM

@nchaulet nchaulet enabled auto-merge (squash) October 8, 2024 11:21
@nchaulet nchaulet merged commit 0a6be07 into elastic:main Oct 8, 2024
35 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

https://github.com/elastic/kibana/actions/runs/11235421654

@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] Jest Tests #16 / query tab with unified timeline Leading actions - notes securitySolutionNotesEnabled = true should have the notification dot & correct tooltip

Metrics [docs]

✅ unchanged

cc @nchaulet

@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

@nchaulet nchaulet deleted the fix-fleet-server-host-removal branch October 8, 2024 12:43
kibanamachine added a commit that referenced this pull request Oct 8, 2024
…95377) (#195398)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Fleet] Fix fleet server host removal from managed policies
(#195377)](#195377)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Nicolas
Chaulet","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-08T12:28:41Z","message":"[Fleet]
Fix fleet server host removal from managed policies
(#195377)","sha":"0a6be076ead7061bb638365ff1fed007bfa1faf0","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Fleet","v9.0.0","backport:prev-minor","v8.16.0"],"title":"[Fleet]
Fix fleet server host removal from managed
policies","number":195377,"url":"https://github.com/elastic/kibana/pull/195377","mergeCommit":{"message":"[Fleet]
Fix fleet server host removal from managed policies
(#195377)","sha":"0a6be076ead7061bb638365ff1fed007bfa1faf0"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/195377","number":195377,"mergeCommit":{"message":"[Fleet]
Fix fleet server host removal from managed policies
(#195377)","sha":"0a6be076ead7061bb638365ff1fed007bfa1faf0"}},{"branch":"8.x","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Nicolas Chaulet <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) ci:build-cloud-image release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team v8.16.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inconsistent Fleet Behavior when Removing Configurations from kibana.yml for Managed Agent Policies
5 participants