-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[Ingest Manager] Agent unenroll #19507
Conversation
Tested with latest kibana branch unpdates, agent ACKs UNENROLL and disapears from the list as expected |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall the code looks good. Seems you still need to add more to clean the action store, assume that is coming in a later branch.
I have more of a question on what happens to Agent after the completion of unenroll
. Will it still be able to communicate with the Fleet gateway? I assume that the API keys will be invalidated after ack of unenroll
, so then communication will be broken.
If that is the case, should Agent set a configuration setting into the Fleet config so it knows that it is unenrolled? We don't want Fleet to go to standalone mode (that would be weird/wrong). We also don't want it to keep reaching out to Fleet and failing (that would add load both the the client and server, for no benefit). We also don't want to just stop, as the service manager of the system will just keep restarting it.
If I understand unenroll
correctly we need some kinda of idle state, that just logs Agent is unenrolled and it just really does nothing (but stays running).
@blakerouse I was thinking we will use the same mechanism needed for reexec, cancelling everything down and stopping all the loops/processes. for now cancellation is not that good. but it is a good point. in the meantime i will just stop fleet gateway |
Reworked it a bit going to idle state on restart after being unenrolled. |
What does this PR do?
This PR works with draft from here: elastic/kibana#70031
Accepts UNENROLL actions and stop all the processes it has started.
Why is it important?
Removing endpoint on unenroll.
Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.