-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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] Restart upgrade should be allowed when upgrade is in progress #184212
Comments
Pinging @elastic/fleet (Team:Fleet) |
This needs to be done with some caution, an upgrade during the watching state is potentially destructive to the agent. The watcher is a separate process and will interpret the new upgrade as a crash. The agent's upgrade watcher needs to be smarter than this, but today it isn't. Do we know how this happened yet? I want us to avoid putting in potentially destructive work arounds for rare bugs that should just be fixed instead. |
What sequence of user actions would cause this? In between whatever those two steps are, it would be better if we told the agent we were cancelling the upgrade, or perhaps we need to have the agent interpret a request to upgrade to a new version during an upgrade to a different one an implicit cancellation. |
I think this is a real UI bug, we don't' allow restart upgrade if the agent is in watching state, but not even when the agent is stuck updating. The fix includes a check before allowing restart upgrade that the agent is in |
## Summary Closes #184212 Fix the Restart upgrade modal submit button disabled condition. It was not correct for single agent restart, the restart was disabled. To verify: - enroll an agent with an older version e.g. 8.13.1 - upgrade agent with a fictive version e.g. 8.13.5 - update the agent doc to set the `upgrade_started_at` to more than 2 hours ago - go to `Restart upgrade`, the modal window show enable submit <img width="818" alt="image" src="https://github.com/elastic/kibana/assets/90178898/0edbbb1a-7a51-4287-8598-0d4437bbc874"> ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
## Summary Closes elastic#184212 Fix the Restart upgrade modal submit button disabled condition. It was not correct for single agent restart, the restart was disabled. To verify: - enroll an agent with an older version e.g. 8.13.1 - upgrade agent with a fictive version e.g. 8.13.5 - update the agent doc to set the `upgrade_started_at` to more than 2 hours ago - go to `Restart upgrade`, the modal window show enable submit <img width="818" alt="image" src="https://github.com/elastic/kibana/assets/90178898/0edbbb1a-7a51-4287-8598-0d4437bbc874"> ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios (cherry picked from commit 1750ab8)
## Summary Closes elastic#184212 Fix the Restart upgrade modal submit button disabled condition. It was not correct for single agent restart, the restart was disabled. To verify: - enroll an agent with an older version e.g. 8.13.1 - upgrade agent with a fictive version e.g. 8.13.5 - update the agent doc to set the `upgrade_started_at` to more than 2 hours ago - go to `Restart upgrade`, the modal window show enable submit <img width="818" alt="image" src="https://github.com/elastic/kibana/assets/90178898/0edbbb1a-7a51-4287-8598-0d4437bbc874"> ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
) # Backport This will backport the following commits from `main` to `8.14`: - [[Fleet] fix restart upgrade disabled condition (#184586)](#184586) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Julia Bardi","email":"90178898+juliaElastic@users.noreply.github.com"},"sourceCommit":{"committedDate":"2024-06-03T13:53:06Z","message":"[Fleet] fix restart upgrade disabled condition (#184586)\n\n## Summary\r\n\r\nCloses https://github.com/elastic/kibana/issues/184212\r\n\r\nFix the Restart upgrade modal submit button disabled condition. It was\r\nnot correct for single agent restart, the restart was disabled.\r\n\r\nTo verify:\r\n- enroll an agent with an older version e.g. 8.13.1\r\n- upgrade agent with a fictive version e.g. 8.13.5\r\n- update the agent doc to set the `upgrade_started_at` to more than 2\r\nhours ago\r\n- go to `Restart upgrade`, the modal window show enable submit\r\n\r\n\r\n<img width=\"818\" alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/90178898/0edbbb1a-7a51-4287-8598-0d4437bbc874\">\r\n\r\n\r\n### Checklist\r\n\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios","sha":"1750ab8676dadb3d6f2f3dbfe0ee9ea95de66733","branchLabelMapping":{"^v8.15.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Fleet","backport:prev-minor","v8.15.0"],"title":"[Fleet] fix restart upgrade disabled condition","number":184586,"url":"https://github.com/elastic/kibana/pull/184586","mergeCommit":{"message":"[Fleet] fix restart upgrade disabled condition (#184586)\n\n## Summary\r\n\r\nCloses https://github.com/elastic/kibana/issues/184212\r\n\r\nFix the Restart upgrade modal submit button disabled condition. It was\r\nnot correct for single agent restart, the restart was disabled.\r\n\r\nTo verify:\r\n- enroll an agent with an older version e.g. 8.13.1\r\n- upgrade agent with a fictive version e.g. 8.13.5\r\n- update the agent doc to set the `upgrade_started_at` to more than 2\r\nhours ago\r\n- go to `Restart upgrade`, the modal window show enable submit\r\n\r\n\r\n<img width=\"818\" alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/90178898/0edbbb1a-7a51-4287-8598-0d4437bbc874\">\r\n\r\n\r\n### Checklist\r\n\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios","sha":"1750ab8676dadb3d6f2f3dbfe0ee9ea95de66733"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.15.0","branchLabelMappingKey":"^v8.15.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/184586","number":184586,"mergeCommit":{"message":"[Fleet] fix restart upgrade disabled condition (#184586)\n\n## Summary\r\n\r\nCloses https://github.com/elastic/kibana/issues/184212\r\n\r\nFix the Restart upgrade modal submit button disabled condition. It was\r\nnot correct for single agent restart, the restart was disabled.\r\n\r\nTo verify:\r\n- enroll an agent with an older version e.g. 8.13.1\r\n- upgrade agent with a fictive version e.g. 8.13.5\r\n- update the agent doc to set the `upgrade_started_at` to more than 2\r\nhours ago\r\n- go to `Restart upgrade`, the modal window show enable submit\r\n\r\n\r\n<img width=\"818\" alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/90178898/0edbbb1a-7a51-4287-8598-0d4437bbc874\">\r\n\r\n\r\n### Checklist\r\n\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios","sha":"1750ab8676dadb3d6f2f3dbfe0ee9ea95de66733"}}]}] BACKPORT--> Co-authored-by: Julia Bardi <90178898+juliaElastic@users.noreply.github.com>
…e due to token limitations in function description (elastic#184212) Fix Conflicts in x-pack/plugins/observability_solution/observability_ai_assistant/server/functions/index.ts
…e due to token limitations in function description (elastic#184212) Fix Conflicts in x-pack/plugins/observability_solution/observability_ai_assistant/server/functions/index.ts
Issue was reported on a cluster version 8.13.2.
Agent was stuck in updating and it looks like the
Restart upgrade
action was disabled.The
Restart upgrade
action should be enabled if the agent is being upgraded.The text was updated successfully, but these errors were encountered: