elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.73k stars 8.14k forks source link

[Fleet] Trying to upgrade all fleet servers at once spits "Error upgrading agents: Cannot upgrade agent to XXX because it is higher than the latest fleet server version YYY" #168660

Open ipaqmaster opened 11 months ago

ipaqmaster commented 11 months ago

Kibana version: kibana-8.10.2-1.x86_64

Elasticsearch version: elasticsearch-8.10.2-1.x86_64

Server OS version: Rocky Linux 9.2 - Kernel 5.14.0-284.30.1.el9_2.x86_64

Browser version: Firefox 118.0.2 (64-bit)

Browser OS version: Archlinux 6.5.6-arch2-1

Original install method (e.g. download page, yum, from source, etc.): Official RPM Repository

Describe the bug:

Trying to upgrade all fleet servers at once spits

Error upgrading agents:

Error upgrading agents cannot upgrade agent to XXX because it is higher than the latest fleet server version YYY

Steps to reproduce:

  1. Try to upgrade more than one agent at a time to the latest version

Expected behavior:

Kibana should be aware that the multiple agents selected are fleet servers and should not throw this soft UI error when all fleet agents are to be upgraded.

It would also be nice if selecting all agents and upgrading them together could notice the fleet servers are included and won't be a problem.

At the current time it is not possible to upgrade all fleet agents together (Including the fleet servers) - nor upgrading all the fleet servers themselves together because of this version check being called under the wrong conditions. Each fleet server must be upgraded individually from the Fleet dropdown menus.

Screenshots (if relevant):

Errors in browser console (if relevant):

Provide logs and/or server output (if relevant):

Any additional context:

elasticmachine commented 11 months ago

Pinging @elastic/fleet (Team:Fleet)

jen-huang commented 10 months ago

@criamico Did we make changes relevant to this area recently?

criamico commented 10 months ago

@jen-huang I don't recall any changes in 8.10.x that could cause this, this logic that checks the fleet server version separately was added a long time ago.

@ipaqmaster If I understand correctly, the problem arises when there are multiple fleet servers that have different versions and you try to upgrade all of them together?

ipaqmaster commented 10 months ago

Hi

In my experience I had three fleet servers all 'selected' and tried to upgrade them in bulk which threw the error. But their versions were identical.

ehogeweg commented 8 months ago

Hi,

"cannot upgrade agent to 8.12.0 because it is higher than the latest fleet server version 8.7.1"

I see this issue with a single fleet server, upgrading a single agent... The fleet server is at 8.12.0 though so I don't quite understand the message.

kees-closed commented 4 months ago

I also ran into this issue. Still no solution?

image

kpollich commented 4 months ago

Bumping the priority of this and scheduling it for the near future. cc @nimarezainia

nimarezainia commented 4 months ago

@kees-closed we will get this prioritised. Can you in the meantime give us some detail about your deployment please:

kees-closed commented 4 months ago

@kees-closed we will get this prioritised. Can you in the meantime give us some detail about your deployment please:

* cloud or on-prem?

* is your fleet server on-prem or part of

* ESS? your workflow was to update all agents - correct?

Hi, my deployment is on-prem, using vanilla ELK (no Kubernetes/ECE). My Fleet server is also on-prem. My action was to update all nodes, see menu below. When I select 'upgrade agent', I get the error shown in my previous comment.

Screenshot 2024-05-02 at 14-14-40 Agents - Fleet - Elastic

nimarezainia commented 4 months ago

@kees-closed could you first upgrade the agent which is your fleet server? elkalloc05p. Can you let us know if that resolves this issue for you.

While we get around to addressing this.

kees-closed commented 4 months ago

@kees-closed could you first upgrade the agent which is your fleet server? elkalloc05p. Can you let us know if that resolves this issue for you.

While we get around to addressing this.

That works indeed! It also makes sense, didn't think about this update path at first.

nimarezainia commented 4 months ago

Great. for future reference restrictions: https://www.elastic.co/guide/en/fleet/current/upgrade-elastic-agent.html#upgrade-agent-restrictions

ulab commented 2 months ago

I am just getting this warning while trying to update the fleet server from 8.13.4 to 8.14.1

Screenshot 2024-07-03 at 14 08 10