Skip to content

Test fixtures exhaust Docker's default address pools under a full-suite runΒ #649

Description

@genwave-radio

🐳 What

A full dotnet test GenWave.sln (or the whole Host suite alone) intermittently fails 1–23 facts with:

docker compose -p genwave-t372b-<hash> -f tests/GenWave.MediaLibrary.Tests/db-compose.yaml up -d --wait failed:
Network genwave-t372b-<hash>_default Creating … Error response from daemon: all predefined address pools have been fully subnetted

Seen 2026-08-30 on the dev box (thor) at the end of phase G-e: solution run 23 Host reds, Host-alone 1–2, the same facts green standalone. docker network ls shows no leaked networks β€” only the 7 standing project networks β€” so this is peak concurrency, not a leak: every ephemeral fixture (EphemeralStationDatabase, DatabaseFixture) creates its own compose project + network, and xUnit runs collections in parallel.

πŸ”’ Why it bites

Docker's default default-address-pools are 172.17.0.0/12 in /16 slices (15) + 192.168.0.0/16 in /20 slices (16) β‰ˆ 31 networks. Seven are standing (genwave_*, mrdgenwave_*, worldcuptracker*), so ~24 concurrent fixture projects is the ceiling β€” a full Host run can exceed it.

πŸ› οΈ Remedies (pick one; Dean's call β€” daemon config is a box change)

  1. /etc/docker/daemon.json: "default-address-pools": [{"base":"10.200.0.0/16","size":24}] β†’ 256 networks (needs a daemon restart β€” not while the dev stack is on air).
  2. Fixture-side: one shared compose network (external: true) for all fixture projects, or cap fixture parallelism via xunit.runner.json maxParallelThreads.
  3. CI: already runs suites per project, so this is dev-box-only today.

Related: gh-#643 (Story240 under narrow filters β€” a different cause).

https://claude.ai/code/session_01AmM47neuvsJph3ZT4brTCV

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions