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

Remove os.Exit in favor of more graceful shutdown when osquery instance can't be restarted #1479

Merged
merged 5 commits into from
Nov 29, 2023

Conversation

RebeccaMahany
Copy link
Contributor

@RebeccaMahany RebeccaMahany commented Nov 28, 2023

Relates to #1387

The osquery runner currently calls os.Exit when the osquery instance dies and it cannot start a new one. In this case, the rungroup actors will never get a chance to shut down gracefully.

I've updated so that the osquery runner instead signals the osquery extension rungroup to exit its Execute function, allowing for a regular shutdown of all rungroup actors.

@RebeccaMahany RebeccaMahany force-pushed the becca/graceful-shutdown branch from 447fcf9 to b520bbc Compare November 29, 2023 16:56
@RebeccaMahany RebeccaMahany changed the title Remove os.Exit in favor of more graceful shutdown Remove os.Exit in favor of more graceful shutdown when osquery instance can't be restarted Nov 29, 2023
@RebeccaMahany RebeccaMahany marked this pull request as ready for review November 29, 2023 17:01
Copy link
Contributor

@zackattack01 zackattack01 left a comment

Choose a reason for hiding this comment

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

nice 🚀

Copy link
Contributor

@James-Pickett James-Pickett left a comment

Choose a reason for hiding this comment

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

Nice!

@RebeccaMahany RebeccaMahany added this pull request to the merge queue Nov 29, 2023
Merged via the queue into kolide:main with commit 9bd6390 Nov 29, 2023
24 checks passed
@RebeccaMahany RebeccaMahany deleted the becca/graceful-shutdown branch November 29, 2023 21:03
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