Skip to content

Conversation

michel-laterman
Copy link
Contributor

What does this PR do?

Add the agent_policy_id and policy_revision_idx attributes to checkin requests.
These attributes are sources from the action stored as a part of the state.

Why is it important?

The policy information in fleet-server and agent may go out of sync; this may occur in cases where a VM restores from a snapshot.

Checklist

  • I have read and understood the pull request guidelines of this project.
  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in ./changelog/fragments using the changelog tool
  • I have added an integration test or an E2E test

Disruptive User Impact

N/A

Related issues

@michel-laterman michel-laterman added enhancement New feature or request Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team backport-skip labels Sep 12, 2025
@michel-laterman
Copy link
Contributor Author

Adding integration/e2e tests requires the fleet-server to be implemented first: elastic/fleet-server#5501
I'll keep this as a draft until the above PR is merged.

Add the agent_policy_id and policy_revision_idx attributes to checkin
requests.
@michel-laterman michel-laterman force-pushed the feat/checkin-policy-details branch from 39f169e to 0721e6f Compare September 12, 2025 22:09
@michel-laterman michel-laterman force-pushed the feat/checkin-policy-details branch from 0721e6f to cfb5df4 Compare September 12, 2025 22:25

// Ack sends an ack for the associated action if the results are expected.
// An ack will not be sent for a POLICY_CHANGE action, but will be when this method is used by UNENROLL actions.
func (l *policyChange) Ack() error {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It may be less confusing to make this a nop, and provide something else for unenroll actions to use

@elasticmachine
Copy link
Collaborator

elasticmachine commented Sep 12, 2025

💔 Build Failed

Failed CI Steps

History

cc @michel-laterman

Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-skip enhancement New feature or request Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fleet check-in should send policy_id and revision
2 participants