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

[Ingest Manager] prevent possible race conditions when installing/update packages from multiple requests #75810

Closed
neptunian opened this issue Aug 24, 2020 · 7 comments
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Feature:SecurityAdmin Security Solution administration feature impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. Team:Defend Workflows “EDR Workflows” sub-team of Security Solution Team:Fleet Team label for Observability Data Collection Fleet team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. v7.11.0

Comments

@neptunian
Copy link
Contributor

Now that we are tracking the installation/update process in the saved object, we should not try to install/update a package if its currently installing. For example users from different kibana instances trying to update a package or accidentally posting directly to the endpoint twice. This could cause some unexpected behaviour and it would be good to guard against this scenario. We could check the status and return a message that the package is already currently installing or updating. @ruflin mentioned that it might not be reliable to read from the saved object whether something is installing as it could be delayed after writing. Some research needs to be done to make sure this is a viable solution.

This already exists in the UI where we block the install button while its installing, but it doesnt prevent it from happening with multiple kibana instances or through the api.

Would need to be mindful of the scenario that the package is stuck installing but it was because of a kibana crash, that we keep the ability to reinstall or reupdate.

@neptunian neptunian added the Team:Fleet Team label for Observability Data Collection Fleet team label Aug 24, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/ingest-management (Team:Ingest Management)

@ph
Copy link
Contributor

ph commented Aug 24, 2020

race conditions are hard, if the operation are idempotent and update to SO are using optimistic locking with version this should be fine?

@ruflin
Copy link
Contributor

ruflin commented Aug 25, 2020

The question is how SO works under the hood. This reminded me also of #75497

@elasticmachine
Copy link
Contributor

Pinging @elastic/endpoint-management (Team:Endpoint Management)

@ph ph added the bug Fixes for quality problems that affect the customer experience label Oct 19, 2020
@ph
Copy link
Contributor

ph commented Oct 19, 2020

Going to mark this as bug.

@MindyRS MindyRS added the Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. label Oct 27, 2020
@charlie-pichette charlie-pichette added Team:Defend Workflows “EDR Workflows” sub-team of Security Solution and removed Team:Endpoint Management labels Oct 28, 2020
@MindyRS MindyRS added impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. Feature:SecurityAdmin Security Solution administration feature labels Nov 2, 2020
@ph ph added the v7.11.0 label Nov 6, 2020
@skh skh self-assigned this Nov 19, 2020
@skh
Copy link
Contributor

skh commented Dec 1, 2020

Implemented in #84190

@skh skh closed this as completed Dec 1, 2020
@muskangulati-qasource
Copy link

Bug Conversion

  • Test-Case not required as this is a Dev Validation ticket

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:SecurityAdmin Security Solution administration feature impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. Team:Defend Workflows “EDR Workflows” sub-team of Security Solution Team:Fleet Team label for Observability Data Collection Fleet team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. v7.11.0
Projects
None yet
Development

No branches or pull requests

9 participants