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

Fix a couple run groups not exiting #1272

Merged

Conversation

RebeccaMahany
Copy link
Contributor

@RebeccaMahany RebeccaMahany commented Aug 1, 2023

Relates to #1205

A few of of our 12 rungroup actors would not return from Execute on Interrupt, locking shutdown:

  • TraceExporter was waiting for a cancel that wouldn't happen until after the rungroup exited -- fixed to use the usual interrupt channel instead
  • LogShipper (via sendbuffer) would not exit on interrupt because we were breaking out of a select and not the for loop containing it
  • Updater (for both launcher and osquery) was, similar to the TraceExporter, waiting for a cancel that wouldn't happen until after the rungroup exited -- to minimize the changeset in this area of the codebase, I just made a new context and ensured we call the cancel on interrupt

I also made some improvements to how quickly the new TUF autoupdater will respond to shutdown requests. If it's in the middle of an update, it can take a few minutes failing and retrying when querying the current running version of osquery (since the osquery extension has already shut down). Now we check availability before checking current running version, since that's a faster short-circuit, and we perform the osquery retries more quickly.

James-Pickett
James-Pickett previously approved these changes Aug 1, 2023
directionless
directionless previously approved these changes Aug 1, 2023
@RebeccaMahany RebeccaMahany merged commit 9fab2cf into kolide:main Aug 1, 2023
27 checks passed
@RebeccaMahany RebeccaMahany deleted the becca/rungroup-execute-exit branch August 1, 2023 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants