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

Keep rolledback state on agent after rollback is successful #6283

Open
juliaElastic opened this issue Dec 11, 2024 · 3 comments
Open

Keep rolledback state on agent after rollback is successful #6283

juliaElastic opened this issue Dec 11, 2024 · 3 comments
Labels
Team:Elastic-Agent Label for the Agent team

Comments

@juliaElastic
Copy link
Contributor

juliaElastic commented Dec 11, 2024

Related to https://github.com/elastic/ingest-dev/issues/2878

With the automatic upgrades feature, we want to ensure that agents that try to upgrade and are rolled back multiple times can be identified and flagged to the users. In order to handle these rollbacks as retry attempts, we need to ensure that the agent keeps UPG_ROLLBACK state in upgrade_details after rollback is successful.

This is a non-blocker enhancement to the automatic upgrades feature.

@juliaElastic juliaElastic added the Team:Elastic-Agent Label for the Agent team label Dec 11, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/elastic-agent (Team:Elastic-Agent)

@ycombinator
Copy link
Contributor

we need to ensure that the agent keeps UPG_ROLLBACK state in upgrade_details after rollback is successful.

Consider the following sequence of events:

  1. User attempts to upgrade Agent from version X to Y.
  2. Upgrade fails and Agent is rolled back to version X.
  3. The user or system (due to automatic retries) once again attempts to upgrade Agent from version X to Y.
  4. Upgrade fails and Agent is rolled back to version X.
  5. The user or system (due to automatic retries) once again attempts to upgrade Agent from version X to Y.
  6. Upgrade succeeds and Agent is now on version Y.

In this sequence, at the end of step 4, do we just want to know that the upgrade has been rolled back (regardless of how many times it has been rolled back) or do we want to know how many times the upgrade has been rolled back or do we want to keep a list of the times the upgrade was rolled back?

@juliaElastic
Copy link
Contributor Author

Yes, the idea is that the upgrade retry attempts will be increased when the agent was previously in rolled back state.
This is captured in this issue (the logic will be part of the async task in kibana fleet plugin).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Elastic-Agent Label for the Agent team
Projects
None yet
Development

No branches or pull requests

3 participants