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] Prevent installation of packages containing ML models during preconfiguration/setup #120903

Closed
2 tasks
Tracked by #118423
kpollich opened this issue Dec 9, 2021 · 3 comments
Closed
2 tasks
Tracked by #118423
Assignees
Labels
enhancement New value added to drive a business result Team:Fleet Team label for Observability Data Collection Fleet team

Comments

@kpollich
Copy link
Member

kpollich commented Dec 9, 2021

Fleet cannot guarantee idempotency when installing ML models, so it makes sense for us to disallow this for now.

  • Add a step to Fleet setup that excludes any packages that contain at least one ML model asset when installing managed/preconfigured packages
  • Ensure we output a log message indicating the package that was excluded and why
@kpollich kpollich changed the title Creating ML models is not idempotent but no managed packages contain these today. [Fleet] Prevent installation of packages containing ML models during preconfiguration/setup Dec 9, 2021
@botelastic botelastic bot added the needs-team Issues missing a team label label Dec 9, 2021
@kpollich kpollich self-assigned this Dec 9, 2021
@kpollich kpollich added enhancement New value added to drive a business result Team:Fleet Team label for Observability Data Collection Fleet team labels Dec 9, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@botelastic botelastic bot removed the needs-team Issues missing a team label label Dec 9, 2021
@kpollich
Copy link
Member Author

kpollich commented Dec 9, 2021

@joshdover - I was actually just taking a deeper look at this and it seems like we might not actually have an idempotency issue w/ ML model installation:

https:/elastic/kibana/blob/main/x-pack/plugins/fleet/server/services/epm/elasticsearch/ml_model/install.ts#L86-L94

When Fleet installs ML Models, we specifically ignore resource_already_exists_exception exceptions from Elasticsearch. So in a case where multiple Kibana nodes attempt to run setup, I think we'd just silently error on a redundant ML model installation.

@kpollich
Copy link
Member Author

I spoke with @alvarezmelissa87 last week about this since she implemented all of Fleet's support for ML assets in integrations. She had no concerns about idempotency or duplication as a result of multiple concurrent installs of ML assets, so it seems like we can close this out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New value added to drive a business result Team:Fleet Team label for Observability Data Collection Fleet team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants