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

Fix healthchecks on single-database instances #5900

Merged
merged 1 commit into from Aug 7, 2023
Merged

Conversation

elprans
Copy link
Member

@elprans elprans commented Aug 5, 2023

Instances running on backends without CREATE_DATABASE capability will
only have the edgedb database in them, while the healthcheck endpoints
attempt to connect to the system database which is only present in
multi-database mode.

Fixes: #5895

@elprans elprans requested a review from fantix August 5, 2023 00:14
Instances running on backends without `CREATE_DATABASE` capability will
only have the `edgedb` database in them, while the healthcheck endpoints
attempt to connect to the system database which is only present in
multi-database mode.

Fixes: #5895
Comment on lines +93 to +95
dbname = edbdef.EDGEDB_SYSTEM_DB
else:
dbname = edbdef.EDGEDB_SUPERUSER_DB

Choose a reason for hiding this comment

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

Will it be adjusted to the database name provided in BACKEND_DSN? i.e. if the (one and only) available database is named differently (not edgedb), will it still work?

#5592 (comment)

In single db mode EdgeDB uses the database provided in --backend-dsn (EDGEDB_SERVER_BACKEND_DSN), e.g. if you give it postgres://host:port/mydb it'll use mydb.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes. In single-database mode edgedb gets translated to whatever was specified in the backend DSN.

@fantix
Copy link
Member

fantix commented Aug 6, 2023

test ran

@elprans elprans merged commit 7ce7162 into master Aug 7, 2023
26 of 28 checks passed
@elprans elprans deleted the single-db-healthcheck branch August 7, 2023 15:59
elprans added a commit that referenced this pull request Aug 22, 2023
Instances running on backends without `CREATE_DATABASE` capability will
only have the `edgedb` database in them, while the healthcheck endpoints
attempt to connect to the system database which is only present in
multi-database mode.

Fixes: #5895
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.

edb.server: Received signal: 15. Shutting down
3 participants