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

[Framework bug] Fleet policy changes are not handled correctly, restart required to "sync" state #2992

Open
jedrazb opened this issue Nov 20, 2024 · 0 comments

Comments

@jedrazb
Copy link
Member

jedrazb commented Nov 20, 2024

Bug Description

If we change the connector id in fleet policy, e.g.

from connector xd-123 to xd-456

Image

Image

the agent component will detect this change correctly, but since the only input has been change we will only receive delta event from checkin agent protocol call, see:

Image

We are not receiving any (net new) ES output, so our logic disregards this update and doesn't update config, nor create the new connector doc with new ID. This because we always assume to receive new ES output in update https://github.com/elastic/connectors/blob/main/connectors/agent/protocol.py#L134

If we restart the agent component stuff works fine (and we end up creating xd-456 connector)

[elastic_agent.python_elastic_agent_client][info] Connector input found. Service type: google_drive, Connector ID: xd-456, Connector Name: Google Drive Custom ID
11:24:32.893
elastic_agent.python_elastic_agent_client
connectors-py-default
[elastic_agent.python_elastic_agent_client][warning] No Elasticsearch output found

To Reproduce

Steps to reproduce the behavior:

  1. Create agentless connector policy with connector id defined
  2. It should create a connector with this id
  3. Update policy with new connector id
  4. No new connector created
  5. Restart the agent
  6. New connector created as expected

TO do

Make it work with delta updates of policy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant