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] Remove dependency on .fleet-servers index #173537

Closed
nchaulet opened this issue Dec 18, 2023 · 2 comments · Fixed by #183868
Closed

[Fleet] Remove dependency on .fleet-servers index #173537

nchaulet opened this issue Dec 18, 2023 · 2 comments · Fixed by #183868
Assignees
Labels
Team:Fleet Team label for Observability Data Collection Fleet team

Comments

@nchaulet
Copy link
Member

Description

That PR elastic/fleet-server#3131 remove the coordinator in fleet-server and stop insterting document in .fleet-servers.

We use that index in Fleet to know if fleet is ready to enroll new agent, we should probably stop relying on that, and rely on having fleet server agents online, (we already have that check in the UI)

@nchaulet nchaulet added the Team:Fleet Team label for Observability Data Collection Fleet team label Dec 18, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@jen-huang
Copy link
Contributor

Draft PR is up here to remove it from fleet: #183868

I've reached out to the Security team to see if they want to patch the single usage in their plugin themselves or just give me a bit more context so I can replace it.

jen-huang added a commit that referenced this issue Jun 5, 2024
## Summary

Resolves #173537.

This PR removes all usages and references to `.fleet-servers` index.

A small refactoring was done that moves helper functions in enrollment
settings API to fleet server services. It's a better place for them
because they are related to fleet server anyway. With this change, we
now use these functions to calculate the readiness of Fleet
(`hasFleetServers` was previously reading on `.fleet-servers` index).

The readiness of a fleet server is defined as at least one online agent
enrolled into an agent policy that contains a fleet server policy.

### Changes in Security Solution (@paul-tavares)

- Updated `enableFleetServerIfNecessary()` utility _(used for testing,
dev)_ to not use `.fleet-servers` index and instead write a Agent record
to the `.fleet-agents` index for Fleet Server. This record writing is
skipped when running tests in serverless mode, instead,
`xpack.fleet.internal.fleetServerStandalone=true` is added to mimic
skipping checks for Fleet Server in real serverless.


### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

---------

Co-authored-by: Paul Tavares <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Fleet Team label for Observability Data Collection Fleet team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants