-
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
[Agent] Handle kill nicely #17318
[Agent] Handle kill nicely #17318
Conversation
Pinging @elastic/ingest-management (Project:fleet) |
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.
LGTM, just remove the Println
and lets get the CI in to be safe.
@@ -155,7 +156,8 @@ func (f *fleetGateway) worker() { | |||
|
|||
func (f *fleetGateway) doExecute() (*fleetapi.CheckinResponse, error) { | |||
f.backoff.Reset() | |||
for { | |||
for f.bgContext.Err() == nil { | |||
fmt.Println(">>> loop: ", f.bgContext.Err()) |
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.
debug?
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.
ahh :D
[Agent] Improved cancellation of agent (elastic#17318) (cherry picked from commit 65b5255)
What does this PR do?
Changes to some context handles.
TBH i dont like this solution, and i think we will need to udnertake some more complex refactor to behave nicer, we have a lot of moving parts and background workers which are interconnected what makes this a bit complicated to introduce context as a second step (we started completely without context)
I'm ok to get this in as a quick fix but under a condition of further refactor, so i'm publishing this as a draft.
Why is it important?
To speed up ctrl c kill
Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.