Closed
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
Continuation of #7491. Whilst short lived containers do now start up correctly, more often (~90% for me) than not they will lead to the following error being logged in the app host every 20-30 seconds
fail: Aspire.Hosting.Dcp.dcpctrl.NetworkReconciler[0]
"default-aspire-network-4lbg36prig", "error": "container f812de8471240f5da3a4d7c223558b2ad09ba587230e88f7c081bc80cc5aba70 is not connected to network b6cfe4a005c3ec4e58ee9f2054406ad3c188b7b1c3c807f29889b47715012967\nobject not found\ncontainer not found"}
There is also a weird secondary problem if you have other containers alongside this - some of them get stuck in the Starting
state until the first of the not connected to network
log gets logged.
Expected Behavior
No errors, and no delaying other container start up.
Steps To Reproduce
(Note, this doesn't always reproduces, but it does reproduce more often than not)
- Start an application with the below container
- After the resource starts, wait roughly 30 secs and check your apphost console output.
builder.AddContainer($"quick-succeed", "mcr.microsoft.com/dotnet/runtime-deps", "9.0")
.WithEntrypoint("sh")
.WithArgs("-c", "echo \"I'm a success\"")
;
Exceptions (if any)
No response
.NET Version info
<Sdk Name="Aspire.AppHost.Sdk" Version="9.2.0-preview.1.25176.5" />
<PackageReference Include="Aspire.Hosting.AppHost" Version="9.2.0-preview.1.25176.5" />
Anything else?
If your short lived container exits with an exit code, you get only a single "is not connected to network" after 20-30 seconds, not the repeats you get with a non exited container.
builder.AddContainer($"quick-failure", "mcr.microsoft.com/dotnet/runtime-deps", "9.0")
.WithEntrypoint("sh")
.WithArgs("-c", "echo \"I'm a failure\"; exit 123")
;