Actions
Bug #26744
closedServer wrongly determines the node's agent version
Status:
Resolved
Priority:
To review
Assignee:
-
Category:
Server components
Target version:
-
Pull Request:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
To do
Fix check:
To do
Regression:
No
Description
On a node, if both packages :
ii rudder-agent 8.3.0~rc2~git202504102241 arm64 Configuration management and audit tool - agent ii rudder-agent-build-deps 2.3.0~alpha~git-0 all build-dependencies for rudder-agent
The Rudder server will wrongly display the agent version as being « 2.3.0~alpha~git-0 »
Removing the rudder-agent-build-deps package causes the server to display the correct agent version.
Updated by Nicolas CHARLES 17 days ago
Without the inventory, we can't do much on this issue. Can you add the generated inventory ?
Updated by Alexis Mousset 17 days ago
· Edited
Probably no need for an inventory, the problem lies in the inventory reader which takes the first item containing "rudder-agent" in its name... I guess the order puts the wrong package first.
val agentSoftName = agentType.inventorySoftwareName.toLowerCase()
software.filter(_.name.exists(_.toLowerCase().contains(agentSoftName))).toList.flatMap(_.version) match {
case Nil =>
InventoryProcessingLogger.logEffect.warn(
s"No software with name '${agentSoftName}' were found when looking for version of the agent"
)
None
case x :: others =>
if (others.nonEmpty) {
InventoryProcessingLogger.logEffect.warn(
s"More than one software with name '${agentSoftName}' were found when looking for version. We only keep '${x}' and discard ${others
.mkString(",")}"
)
}
Some(AgentVersion(agentType.toAgentVersionName(x.value)))
}
If there is an exact match it should be used.
Updated by François ARMAND 10 days ago
- Status changed from New to Resolved
This is not a problem anymore since we will use the AGENT_VERSION
special tag from #26918
Updated by François ARMAND 10 days ago
- Related to Enhancement #26918: Store agent-version as a dedicated field added
Actions