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

Add support for flushing decision logs on graceful shutdown #780

Closed
tsandall opened this issue Jun 11, 2018 · 2 comments · Fixed by #2746
Closed

Add support for flushing decision logs on graceful shutdown #780

tsandall opened this issue Jun 11, 2018 · 2 comments · Fixed by #2746

Comments

@tsandall
Copy link
Member

tsandall commented Jun 11, 2018

Users have asked if OPA can flush decision logs during a graceful shutdown.

There are a couple options here.

  1. Configure OPA to handle signals and wait for the decision log to upload
  2. Expose an HTTP API on OPA to trigger a decision log flush
flavio added a commit to flavio/opa that referenced this issue Oct 30, 2018
Handle SIGINT and SIGTERM inside of opa server. Trigger clean stop of
plugins, this ensures decision logs are flushed accordingly.

Fixes issue open-policy-agent#780

Signed-off-by: Flavio Castelli <[email protected]>
@tsandall
Copy link
Member Author

tsandall commented Apr 8, 2019

Now that we have support for custom decision loggers, it's possible for users to implement this kind of behaviour on their own by building from source. I'm going to close this issue since we haven't heard of any other use cases since.

@tsandall tsandall closed this as completed Apr 8, 2019
@tsandall
Copy link
Member Author

Flushing the decision log on graceful shutdown would reduce the # of decision logs that can be lost with the default logger.

@tsandall tsandall reopened this Aug 23, 2019
anderseknert added a commit to Bisnode/opa that referenced this issue Oct 14, 2020
..re-attempting until either the graceful shutdown period is over or all logs have been uploaded.

Fixes open-policy-agent#780

Signed-off-by: Anders Eknert <[email protected]>
patrick-east pushed a commit that referenced this issue Oct 14, 2020
..re-attempting until either the graceful shutdown period is over or all logs have been uploaded.

Fixes #780

Signed-off-by: Anders Eknert <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant