You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With the introduction of the tracking of UPG_ROLLBACK state the watcher compares the new version of the agent with the previous one. However when comparing it only uses the major.minor.path[-SNAPSHOT], ignoring the build hash.
If the agent is upgraded from an SNAPSHOT version to another the watcher considers they as being the same version and therefore it marks the upgrade as UPG_ROLLBACK and neither logs why it changed the upgrade status nor adds any information to the new state.
This leads to an successful upgrade, a healthy agent but marked as UPG_ROLLBACK as shown below. Without any log or information explaining why the agent is on an UPG_ROLLBACK state.
cmacknz
changed the title
Watcher does not consider build hash when comparing versions
Watcher does not consider build hash when determining if upgrade was rolled back
Nov 25, 2023
With the introduction of the tracking of
UPG_ROLLBACK
state the watcher compares the new version of the agent with the previous one. However when comparing it only uses the major.minor.path[-SNAPSHOT], ignoring the build hash.If the agent is upgraded from an SNAPSHOT version to another the watcher considers they as being the same version and therefore it marks the upgrade as
UPG_ROLLBACK
and neither logs why it changed the upgrade status nor adds any information to the new state.This leads to an successful upgrade, a healthy agent but marked as
UPG_ROLLBACK
as shown below. Without any log or information explaining why the agent is on anUPG_ROLLBACK
state.The culprit seems to be here:
elastic-agent/internal/pkg/agent/application/upgrade/marker_watcher.go
Lines 117 to 123 in d58ac9c
The
UpgradeMarker
has both hashes, it just need to be used when comparing the versionselastic-agent/internal/pkg/agent/application/upgrade/step_mark.go
Lines 27 to 43 in d58ac9c
For confirmed bugs, please report:
The text was updated successfully, but these errors were encountered: