Skip to content

Panic while handling /health?bundle=true  #1703

Closed
@patrick-east

Description

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.

Metadata

Assignees

Labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions