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

Catch signals and allow managed tearDown and reloads #1488

Closed
theopolis opened this issue Sep 2, 2015 · 1 comment
Closed

Catch signals and allow managed tearDown and reloads #1488

theopolis opened this issue Sep 2, 2015 · 1 comment
Assignees
Labels
events Related to osquery's evented tables or eventing subsystem feature
Milestone

Comments

@theopolis
Copy link
Member

Catching signals is helpful! This allows us to gracefully call tearDown on all plugins but most importantly the EventPublisherPlugin types. The soon-to-be-merged audit publisher for Linux (#1463) makes system configuration changes during setUp that SHOULD be removed during tearDown. The HUP signal could be forwarded to the active ConfigPlugin and cause a plugin-optional config reload.

When a worker/watcher is used the parent should forward handled signals to the worker process.

@theopolis theopolis added feature events Related to osquery's evented tables or eventing subsystem labels Sep 2, 2015
@theopolis theopolis self-assigned this Sep 2, 2015
theopolis pushed a commit that referenced this issue Sep 15, 2015
[#1488] Use signal handlers for teardown and reloading
@theopolis
Copy link
Member Author

Signal handling was implemented in #1494. There are some locations where event publishers do not tear down within a reasonable amount of time. To extend the scope of this issue a bit

  • Test that Linux and Darwin-based publishers tearDown consistently within the alarm time of 10 seconds.
  • Throw the original signal instead of alarm if the tearDown grace period expires.
  • Modify the Linux init script and osqueryctl to send non-kill commands, which allow graceful shutdown.

@theopolis theopolis added this to the 1.5.3 milestone Sep 22, 2015
theopolis pushed a commit to theopolis/osquery that referenced this issue Sep 22, 2015
theopolis pushed a commit that referenced this issue Sep 22, 2015
[#1488] Stop OS X event publishers with SIGINT
theopolis pushed a commit to theopolis/osquery that referenced this issue Sep 23, 2015
theopolis pushed a commit that referenced this issue Sep 24, 2015
[#1488] Shutdown Linux event publishers responsibly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
events Related to osquery's evented tables or eventing subsystem feature
Projects
None yet
Development

No branches or pull requests

1 participant