-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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] Surface conditions making the agent "not upgradeable" on "error upgrading agent" message #171840
Labels
enhancement
New value added to drive a business result
Team:Fleet
Team label for Observability Data Collection Fleet team
Comments
criamico
added
enhancement
New value added to drive a business result
Team:Fleet
Team label for Observability Data Collection Fleet team
labels
Nov 23, 2023
Pinging @elastic/fleet (Team:Fleet) |
1 task
Related: #173281 |
criamico
added a commit
that referenced
this issue
Dec 19, 2023
) Closes #171840 Also implements the UI part of #173281 ## Summary When trying to upgrade a single agent that is not upgradeable, the error message doesn't specify _why_ the agent cannot be upgraded. This PR is introducing: - More granular error messages in the endpoint `POST agent/{agent_id}/upgrade`. The messages are now different depending on which conditions are met. For the case when the agent is reported not upgradeable from elastic agent, there is now an error message the states it explicitly. - When clicking on the `upgrade 1 agent` from the bulk actions, if the agent is not upgradeable the submit button is now greyed out and a message explaining the reason is shown: - ![Screenshot 2023-12-18 at 14 41 48](https://github.com/elastic/kibana/assets/16084106/8e0a03b4-c8fc-4a2e-aea6-77c7cc1acdf3) The same warning appears when clicking on other upgrade actions in the bulk action menu, but only for a single agent. Multiple upgrades have not been changed. - In the agents list, reuse the existing tooltip besides the version to show the same messages when the agent is not upgradeable: ![Screenshot 2023-12-18 at 14 40 32](https://github.com/elastic/kibana/assets/16084106/ada30bc0-8c58-40d9-b7cf-c5c7a81a75f7) ### Checklist - [ ] [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 --------- 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
enhancement
New value added to drive a business result
Team:Fleet
Team label for Observability Data Collection Fleet team
When upgrading an agent, we read the
local_metadata.elastic.agent.upgradeable
state from the elastic agent data, but we also do additional checks to mark the agent as upgradeable:kibana/x-pack/plugins/fleet/common/services/is_agent_upgradeable.ts
Lines 16 to 43 in 3ec310b
In some cases this can result in this error message, that gives no explanations about why the agent cannot be upgraded:
Add additional information to the error message explaining why the agent is not upgradeable. We can easily get this info from
is_agent_upgradeable
itself.Example
One example is the following agent, that has
"upgradeable": true,
from the agent itself but"upgrade_started_at": "2023-09-12T21:01:57.796Z"
and"upgraded_at": null
that mark the agent as alreadyupgrading
and so don't allow starting another upgrade.In this case the error message should say something like
agent N.. is not upgradeable: an upgrade attempt started at "2023-09-12T21:01:57.796Z" and was not completed
The text was updated successfully, but these errors were encountered: