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

use bb8 error sink to log more errors #3232

Merged
merged 3 commits into from
May 26, 2023
Merged

use bb8 error sink to log more errors #3232

merged 3 commits into from
May 26, 2023

Conversation

davepacheco
Copy link
Collaborator

@davepacheco davepacheco commented May 26, 2023

I found while debugging #3207 that bb8 provides a way to receive database connection errors that aren't associated with a checked-out connection. We should use this to report those errors.

@davepacheco
Copy link
Collaborator Author

I tested this by running omicron-dev db-run, then starting Nexus, then killing the db-run command. Nexus emitted eight lines of this:

03:00:37.734Z ERRO e6bff1ff-24fb-49dc-a54e-c6a350cd4d6c (ServerContext): database connection error
    database_url = postgresql://[email protected]:32221/omicron?sslmode=disable
    error_message = Failed to checkout a connection: server is shutting down

The error message is a little misleading because we weren't trying to checkout a connection. I will take a look at fixing this up in async-bb8-diesel. But that's unrelated to this change.

@davepacheco davepacheco requested a review from sunshowers May 26, 2023 03:02
Copy link
Contributor

@sunshowers sunshowers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thanks!

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 this pull request may close these issues.

2 participants