-
Notifications
You must be signed in to change notification settings - Fork 103
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
Move osquery extension management into osquery instance #1927
Move osquery extension management into osquery instance #1927
Conversation
e420dea
to
f5403d4
Compare
|
||
// addShutdownGoroutineToErrgroup adds the given goroutine to the errgroup, ensuring that we log its start and exit. | ||
// The goroutine will not execute until the instance has received a signal to exit. | ||
func (i *OsqueryInstance) addShutdownGoroutineToErrgroup(ctx context.Context, goroutineName string, goroutine func() error) { |
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.
these are very nice 🔥
|
||
// addShutdownGoroutineToErrgroup adds the given goroutine to the errgroup, ensuring that we log its start and exit. | ||
// The goroutine will not execute until the instance has received a signal to exit. | ||
func (i *OsqueryInstance) addShutdownGoroutineToErrgroup(ctx context.Context, goroutineName string, goroutine func() error) { |
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.
these are very nice 🔥
// Here be dragons | ||
// | ||
// There are two thorny issues. First, we "invert" control of | ||
// the osquery process. We don't really know when osquery will | ||
// be running, so we need a bunch of retries on these connections |
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.
This part might still be true?
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.
This part didn't seem relevant to keep here anymore because we don't have the retries below this method -- the code was refactored (previously) to move those retries inside the StartOsqueryClient
and StartOsqueryExtensionManagerServer
methods.
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.
Fair... the inverted control part is true, but maybe better elsewhere.
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.
I'll add it back as a comment in next PR!
// the osquery process. We don't really know when osquery will | ||
// be running, so we need a bunch of retries on these connections | ||
// | ||
// Second, because launcher supplements the enroll |
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.
This part is slain.
Relates to #1827
Relates to #1936.
Per ADR, moves extension management into osquery instance.
This adds two new goroutines to the osquery instance's errgroup. To simplify a bit, this PR has also added the following:
kolide
extension, adding all tables tokolide_grpc
instead