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 upgrades of agents already in updating state #133763

Merged
merged 2 commits into from
Jun 8, 2022

Conversation

criamico
Copy link
Contributor

@criamico criamico commented Jun 7, 2022

Fixes #132992

Summary

Adding a check to the isUpgradeable function to make sure that an agent that is already in updating state doesn't get upgraded, both with regular and bulk upgrades. This function is used in many places so it means that an updating agent will deemed not upgradeable wherever we check it.

Testing

  • install many agents, I used horde to simulate them
  • upgrade some agents
  • while they are in updating state, trigger the upgrade again, the endpoint should come back with an error similar to agent_id is not upgradeable

Checklist

@criamico criamico added release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team auto-backport Deprecated - use backport:version if exact versions are needed v8.3.0 labels Jun 7, 2022
@criamico criamico self-assigned this Jun 7, 2022
@criamico criamico marked this pull request as ready for review June 7, 2022 13:33
@criamico criamico requested a review from a team as a code owner June 7, 2022 13:33
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

Copy link
Member

@nchaulet nchaulet left a comment

Choose a reason for hiding this comment

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

Looks good to me 👍

@criamico
Copy link
Contributor Author

criamico commented Jun 7, 2022

@elasticmachine merge upstream

1 similar comment
@criamico
Copy link
Contributor Author

criamico commented Jun 8, 2022

@elasticmachine merge upstream

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
fleet 93.1KB 93.1KB +41.0B

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @criamico

@criamico criamico merged commit ba05c2c into elastic:main Jun 8, 2022
@criamico criamico deleted the 132992_upgrades_for_updating_agents branch June 8, 2022 10:11
kibanamachine pushed a commit that referenced this pull request Jun 8, 2022
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit ba05c2c)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.3

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

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Jun 8, 2022
#133863)

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit ba05c2c)

Co-authored-by: Cristina Amico <criamico@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated - use backport:version if exact versions are needed release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team v8.3.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Fleet]: User is able to upgrade same agent multiple times causing multiple upgrading notifications.
5 participants