Open davidfowl opened 2 hours ago
Just as a diagnostic (wasn't clear from the video) - but had the container started by the time you pressed Restart? I've noticed sometimes there can be a bit of a delay between the container build completing and the container actually running.
It was running yep.
I'm able to repro with Stop then Start too (on main
).
OK so I added some extra logging to the start/stop logic:
https://github.com/dotnet/aspire/pull/6395
What I'm seeing based on my logging changes is this output.
warn: Aspire.Hosting.Dcp.ApplicationExecutor[0]
Starting delete of resource.
info: Aspire.Hosting.Dcp.dcpctrl.ContainerReconciler[0]
no more Container resources are being watched, cancelling container watch {"Container": {"name":"mycontainer-pjuuytar"}, "Reconciliation": 20}
warn: Aspire.Hosting.Dcp.ApplicationExecutor[0]
Completed delete of resource.
warn: Aspire.Hosting.Dcp.ApplicationExecutor[0]
Getting resource.
warn: Aspire.Hosting.Dcp.ApplicationExecutor[0]
Resource got!.
warn: Aspire.Hosting.Dcp.ApplicationExecutor[0]
Getting resource.
warn: Aspire.Hosting.Dcp.ApplicationExecutor[0]
Resource got!.
warn: Aspire.Hosting.Dcp.ApplicationExecutor[0]
Getting resource.
warn: Aspire.Hosting.Dcp.ApplicationExecutor[0]
Resource got!.
warn: Aspire.Hosting.Dcp.ApplicationExecutor[0]
Getting resource.
warn: Aspire.Hosting.Dcp.ApplicationExecutor[0]
Resource got!.
warn: Aspire.Hosting.Dcp.ApplicationExecutor[0]
Getting resource.
warn: Aspire.Hosting.Dcp.ApplicationExecutor[0]
Resource got!.
warn: Aspire.Hosting.Dcp.ApplicationExecutor[0]
Getting resource.
warn: Aspire.Hosting.Dcp.ApplicationExecutor[0]
Resource got!. <------ it gave up trying to start here because the resource still existed.
warn: Aspire.Hosting.Dcp.ApplicationExecutor[0]
Starting delete of resource.
warn: Aspire.Hosting.Dcp.ApplicationExecutor[0]
Completed delete of resource.
warn: Aspire.Hosting.Dcp.ApplicationExecutor[0]
Getting resource.
warn: Aspire.Hosting.Dcp.ApplicationExecutor[0]
Resource got!.
warn: Aspire.Hosting.Dcp.ApplicationExecutor[0]
Getting resource.
warn: Aspire.Hosting.Dcp.ApplicationExecutor[0]
Resource got!.
warn: Aspire.Hosting.Dcp.ApplicationExecutor[0]
Getting resource.
warn: Aspire.Hosting.Dcp.ApplicationExecutor[0]
Resource not found.
warn: Aspire.Hosting.Dcp.ApplicationExecutor[0]
Creating
warn: Aspire.Hosting.Dcp.ApplicationExecutor[0]
Created! <---- second time worked.
What I think is happening is that it is taking a long time for Docker to stop the container (or for DCP to notice).
@danegsta could use your input on this one. @davidfowl if you checkout my branch from the PR above do you see similar symptoms. I'm particularly interested in the time it takes between pressing Stop and for it to appear stopped in the portal.
It's possible I've got some local performance issues, but I haven't done much exotic to my machine other than keep up with updates.
Here's what happens: https://github.com/user-attachments/assets/04c3b6c9-78b0-4f38-a701-26eea0f39df4
Here's the console output:
Additional information: Stop and Start seem to work.