testcontainers / testcontainers-dotnet

A library to support tests with throwaway instances of Docker containers for all compatible .NET Standard versions.
https://dotnet.testcontainers.org
MIT License
3.65k stars 250 forks source link

[Bug]: Container hangs in azure-pipelines.yml #1105

Closed mrpmorris closed 4 months ago

mrpmorris commented 5 months ago

Testcontainers version

3.7.0

Using the latest Testcontainers version?

Yes

Host OS

Ubuntu 22.04.3

Host arch

x64

.NET version

8

Docker version

Whatever azure-pipelines.yml is currently using

Docker info

Whatever azure-pipelines.yml is currently using

What happened?

Running dotnet test just hangs

Relevant log output

A total of 1 test files matched the specified pattern.
##[debug]Agent running environment resource - Disk: available:16874.00MB out of 74244.00MB, Memory: used 35MB out of 6921MB, CPU: usage 12.86
[testcontainers.org 00:00:00.06] Connected to Docker:
  Host: unix:///var/run/docker.sock
  Server Version: 24.0.7
  Kernel Version: 6.2.0-1019-azure
  API Version: 1.43
  Operating System: Ubuntu 22.04.3 LTS
  Total Memory: 6.76 GB

Additional information

This runs fine on Windows with Docker Desktop installed, but when I run it in azure pipelines it hangs.

HofmeisterAn commented 5 months ago

I use Testcontainers daily on Azure Pipelines with Microsoft's hosted agents and private agents. Hanging containers are very likely a misconfigured wait strategy. If the wait strategy does not indicate readiness, Testcontainers will keep trying it repeatedly. Can you share your container builder configuration?

But I need to admit that I have had issues with my last two builds as well (GH and Azure DevOps share basically the same agents).

[testcontainers.org 00:00:02.51] failed to register layer: write ...: no space left on device

Edit: Ok, in my case there is really no space left 😂.

HofmeisterAn commented 4 months ago

Do you still run into the issue? Can you please share your builder configuration (a reproducer)? Without additional information, I am afraid I cannot help.

HofmeisterAn commented 4 months ago

As mentioned, without additional information, I cannot help. Usually, this happens either due to a misconfigured custom wait strategy or blocking the async context. I will close the issue in the meantime. Do not hesitate to reopen it again if you need further assistance.

mrpmorris commented 4 months ago

If I whittle it down to a minimal repro, I will. Thanks.