Skip to content

[Fleet] Pass start_time to actions when rolling upgrades maintenence window is set to immediately - #136384

Merged
criamico merged 3 commits into
elastic:mainfrom
criamico:fix_immediate_scheduled_upgrades
Jul 18, 2022
Merged

criamico merged 3 commits into
elastic:mainfrom
criamico:fix_immediate_scheduled_upgrades

Conversation

@criamico

@criamico criamico commented Jul 14, 2022 •

Copy link
Copy Markdown
Member

Closes #136022

Summary

The possible parameters for upgrades are as follows:

  1. if rollout_duration_seconds -> Rolling upgrade
  2. if start_time and no rollout_duration_seconds -> schedule without rolling upgrade. minimum_execution_duration and expiration should have the same duration.
  3. no start_time and no rollout_duration_seconds -> regular upgrade
    This PR explicitely sets them following those three cases as the second one was missed.

I added an integration test to cover this specific case.

Checklist

@criamico criamico self-assigned this Jul 14, 2022
@criamico
criamico marked this pull request as ready for review July 14, 2022 10:12
@criamico
criamico requested a review from a team as a code owner July 14, 2022 10:12
@elasticmachine

Copy link
Copy Markdown
Contributor

Pinging @elastic/fleet (Team:Fleet)

Comment thread x-pack/plugins/fleet/server/services/agents/upgrade.ts Outdated
@criamico

Copy link
Copy Markdown
Member Author

Hi @michel-laterman, @nchaulet and I had a discussion about the start_time parameter with and it seems that there are three possible cases when we write to the actions:

  • if rollout_duration_seconds -> Rolling upgrade
  • if start_time and no rollout_duration_seconds -> schedule without rolling upgrade. minimum_execution_duration and expiration should have the same duration.
  • no start_time and no rollout_duration_seconds -> regular upgrade

Can you confirm that we got the parameters correct? Basically we were missing case 2.

@criamico criamico added v8.3.3 auto-backport Deprecated - use backport:version if exact versions are needed labels Jul 14, 2022
@michel-laterman

Copy link
Copy Markdown
Contributor

An action is scheduled by fleet-server if it has a start_time and expiration_time.

@criamico

Copy link
Copy Markdown
Member Author

@elasticmachine merge upstream

@kibana-ci

Copy link
Copy Markdown

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

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

cc @criamico

@criamico
criamico merged commit e57d1f4 into elastic:main Jul 18, 2022
@criamico
criamico deleted the fix_immediate_scheduled_upgrades branch July 18, 2022 13:15
kibanamachine added a commit that referenced this pull request Jul 18, 2022
…window is set to immediately (#136384)

* [Fleet] Pass start_time to actions when rolling upgrades maintenence window is set to immediately

* Break up cases for rolling and scheduled upgrades

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

Copy link
Copy Markdown
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 Jul 18, 2022
…window is set to immediately (#136384) (#136536)

* [Fleet] Pass start_time to actions when rolling upgrades maintenence window is set to immediately

* Break up cases for rolling and scheduled upgrades

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

Co-authored-by: Cristina Amico <criamico@users.noreply.github.com>
patrykkopycinski pushed a commit to patrykkopycinski/kibana that referenced this pull request May 6, 2026
…window is set to immediately (elastic#136384)

* [Fleet] Pass start_time to actions when rolling upgrades maintenence window is set to immediately

* Break up cases for rolling and scheduled upgrades

Co-authored-by: Kibana Machine <42973632+kibanamachine@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:fix Team:Fleet - DEPRECATED Use Team:streams-ui v8.3.3 v8.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Fleet] Scheduled upgrades don't work if maintenance window is set to immediately

6 participants