A fresh PostgreSQL install starts without logging connection errors #20
Labels
No labels
agent
api-regen
agent
architect
agent
coder
agent
console-coder
agent
docs-writer
agent
mechanic
agent
protocol-coder
agent
storage-coder
area/api
area/ci
area/console
area/dhcp
area/dns
area/docs
area/packaging
area/process
area/storage
area/windows
kind
bug
kind
chore
kind
docs
kind
epic
kind
feature
kind
performance
kind
security
kind
test
priority
high
priority
low
priority
medium
resolution
duplicate
resolution
not-a-bug
resolution
wontfix
status
blocked
status
in-progress
status
needs-decision
status
needs-design
status
ready
theme
ad-samba-dns
theme
alternatives-benchmark
theme
console-toolchain
theme
later
theme
parity-devices
theme
parity-query
theme
post-release-fixes
theme
tracker-setup
theme
valkey
theme
windows-installer
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
lantea-one/ninlil#20
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
fail:lines on a clean first start look like a broken install)Why
RP-1 saw two Error lines "An error occurred using the connection to database ..." on the first
start against an empty PostgreSQL server, before the migrator creates the database. The first
call that reaches the database is
GetAppliedMigrationsAsync(
src/dotnet/src/Ninlil.Dns.Data.EntityFrameworkCore/Maintenance/RelationalStartupMigrator.cs:152);EF Core logs the failed open as
RelationalEventId.ConnectionErrorat Error before the providerhandles the missing database. Lowering that event globally is wrong: at runtime it is a real
error.
What changes
In
RelationalStartupMigrator, check first whether the database exists withIRelationalDatabaseCreator.ExistsAsync(EF opens that connection with errors expected and logsat Debug) and, when it does not, log one Information line ("The database ... does not exist yet;
creating it and applying N migrations") and skip the history read. Find the exact call that logs
the two lines before changing anything, and say which it was. Check MySQL and SQL Server the same
way.
Acceptance
RequiresDockertest insrc/dotnet/tests/Ninlil.Dns.Data.Integration.Testsruns themigrator against a server with no database (PostgreSQL, then MySQL and SQL Server) with a
capturing logger and asserts no entry at Error or above (fails first on PostgreSQL).
dotnet test src/dotnet/tests/Ninlil.Dns.Data.Integration.Testswith Docker; build 0 warnings.Source
release-prep.md:21(RP-1 nits).Ghost referenced this issue2026-10-31 14:55:52 -04:00