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

Panic while handling /health?bundle=true #1703

Closed
patrick-east opened this issue Aug 29, 2019 · 0 comments · Fixed by #1704
Closed

Panic while handling /health?bundle=true #1703

patrick-east opened this issue Aug 29, 2019 · 0 comments · Fixed by #1704
Assignees
Labels

Comments

@patrick-east
Copy link
Contributor

patrick-east commented Aug 29, 2019

Expected Behavior

No panic

Actual Behavior

Calling the health API can cause a panic:
Screen Shot 2019-08-28 at 6 36 39 PM

Steps to Reproduce the Problem

Start opa server with a bundle as a data file, ex:

opa run -s ./my-bundle.tar.gz

Curl the health check

curl "http://localhost:8181/health?bundle=true

Additional Info

This can probably be fixed simply by switching the mutex to not be a pointer on the server.

Turns out the problem is that the logic for initializing the mutex was assuming a bundle plugin was active. Loading the bundle in from the CLI hides that.

@patrick-east patrick-east self-assigned this Aug 29, 2019
patrick-east added a commit to patrick-east/opa that referenced this issue Aug 29, 2019
The issue was that with bundles loaded from the file system we would
not initialize the mutex used for checking bundle status.

This fixes the initialization and prevents the error. Health status
works as expected now.

Fixes: open-policy-agent#1703
Signed-off-by: Patrick East <east.patrick@gmail.com>
patrick-east added a commit to patrick-east/opa that referenced this issue Aug 29, 2019
The issue was that with bundles loaded from the file system we would
not initialize the mutex used for checking bundle status.

This fixes the initialization and prevents the error. Health status
works as expected now.

Fixes: open-policy-agent#1703
Signed-off-by: Patrick East <east.patrick@gmail.com>
(cherry picked from commit 3248c2d)
patrick-east added a commit that referenced this issue Aug 30, 2019
The issue was that with bundles loaded from the file system we would
not initialize the mutex used for checking bundle status.

This fixes the initialization and prevents the error. Health status
works as expected now.

Fixes: #1703
Signed-off-by: Patrick East <east.patrick@gmail.com>
patrick-east added a commit that referenced this issue Aug 30, 2019
The issue was that with bundles loaded from the file system we would
not initialize the mutex used for checking bundle status.

This fixes the initialization and prevents the error. Health status
works as expected now.

Fixes: #1703
Signed-off-by: Patrick East <east.patrick@gmail.com>
(cherry picked from commit 3248c2d)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant