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

Controller shutdown error: Unable to release shared lock to the database #909

Closed
talanknight opened this issue Feb 4, 2021 · 0 comments · Fixed by #918
Closed

Controller shutdown error: Unable to release shared lock to the database #909

talanknight opened this issue Feb 4, 2021 · 0 comments · Fixed by #918
Assignees

Comments

@talanknight
Copy link
Contributor

Describe the bug
When shutting down a controller an error is returned "Unable to release shared lock to the database: schema.(Manager).SharedUnlock: postgres.(Postgres).UnlockShared: unknown, unknown: error #0: driver: bad connection"

To Reproduce
Steps to reproduce the behavior, In boundary version 0.1.5:

  1. Make sure that config.hcl has a controller section with a database url specified.
  2. Run boundary database init -config config.hcl
  3. Run boundary server -config config.hcl
  4. Wait for controller to finish starting and hit ctrl-C
  5. See error "Unable to release shared lock to the database: schema.(Manager).SharedUnlock: postgres.(Postgres).UnlockShared: unknown, unknown: error #0: driver: bad connection"

Expected behavior
No error returned

Additional context
The error indicates that the connection to the database was not in a state that allowed releasing the lock. Since this is a postgres advisory lock it should be getting released when the connection to the database is closed. If this happens while the controller is still running it could make it possible for database migrate to happen while the controller is still running.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant