Skip to content

Wait For Final PostgreSQL Server In Core Tests #4855

Description

@chet

Version

main

Describe the bug.

make core/tests waits for PostgreSQL with pg_isready, but the probe does not
select a host. The official PostgreSQL image briefly starts a socket-only server
while it initializes the database, stops that server, and then starts the final
TCP server.

So, postgres-wait can accept the temporary server and move on too early. The
extension check then races that server's shutdown, and the helper fails before
Cargo starts even though PostgreSQL would otherwise become ready normally. One
PR session recorded 16 of these pre-Cargo helper failures.

I expected the helper to wait for the final TCP server while keeping the current
make core/tests TEST_ARGS=... interface, image override, random loopback port,
and exact container cleanup unchanged.

Minimum reproducible example

make core/tests TEST_ARGS="-p carbide-api-db"

The failure is intermittent because it depends on observing the temporary
server during the initialization handoff.

Other/Misc.

Selecting 127.0.0.1 for the readiness probe makes the probe wait for the final
server: the temporary initialization server does not listen on TCP, while the
server used by the published host port must.

  • I agree to follow NVIDIA Infra Controller's Code of Conduct
  • I have searched the open bugs and found no duplicate for this report

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions