Skip to content
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] policy_revision_idx is not updated on policy change ack for policy without Elasticsearch output #2105

Closed
nchaulet opened this issue Nov 23, 2022 · 0 comments · Fixed by #2119
Assignees
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

Comments

@nchaulet
Copy link
Member

nchaulet commented Nov 23, 2022

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 the policy_revision_idx looks like for policy with only logstash output (for data and monitoring, and agent never used ES before) the field is not updated

Impact

Edit: On Kibana > Fleet > Agents, the impacted agents, the ones with all outputs set to Logstash, show as Updating instead of Health 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

func makeUpdatePolicyBody(policyID string, newRev, coordIdx int64) []byte {

the function makeUpdatePolicyBody that update the policy_revision_idx is now called in the updateApiKey if the policy output is elasticsearch in this case look like the only output is logstash this will explain why it's not udpated

I think the problem was introduced in that commit ca9041f

How to reproduce

  1. create an agent policy that use a logstash output for both data and monitoring
  2. enroll an agent
  3. create a new revision of the policy previously created (you can see that policy_revision_idx is not populated and the UI do not display the revision)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants