[Fleet] policy_revision_idx is not updated on policy change ack for policy without Elasticsearch output #2105
Labels
bug
Something isn't working
good first issue
Good for newcomers
Team:Fleet
Label for the Fleet team
v8.6.0
v8.7.0
Description
Looks like
policy_revision_idx
is not updated in.fleet-agents
for policy without Elasticsearch output, normally when an agent acknowledge a policy change fleet server update thepolicy_revision_idx
looks like for policy with only logstash output (for data and monitoring, and agent never used ES before) the field is not updatedImpact
Edit: On Kibana > Fleet > Agents, the impacted agents, the ones with all outputs set to Logstash, show as
Updating
instead ofHealth
and no revision is shown in the UI as well.I think the problem was introduced in that commit ca9041f and impact 8.5+ agents
Details
In the code that handle the action acknowledgement
fleet-server/internal/pkg/api/handleAck.go
Line 587 in 7b0d25a
the function
makeUpdatePolicyBody
that update thepolicy_revision_idx
is now called in theupdateApiKey
if the policy output is elasticsearch in this case look like the only output is logstash this will explain why it's not udpatedI think the problem was introduced in that commit ca9041f
How to reproduce
policy_revision_idx
is not populated and the UI do not display the revision)The text was updated successfully, but these errors were encountered: