-
Notifications
You must be signed in to change notification settings - Fork 625
Azure Storage ports changing despite using ContainerLifetime.Persistent
#7058
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Let's update to use proxyless for persistent containers. |
I can't reproduce this on main, @MarcinJuraszek can you use a daily build and see if you can reproduce it https://github.com/dotnet/aspire/blob/main/docs/using-latest-daily.md? |
This problem applies to all containers. The solution for the foreseeable future is to use the new API introduced in this PR which can disable endpoint proxying. The direct effect is that the "Target Port" of an endpoint will be the one exposed directly by the container, so it will be stable. The risk is that there could be conflicts with other services, and that you can't run two instances of the same container with this mode. This is until some down-level work is done in Note that the ports can be defined in the application host using |
Sample usage: var builder = DistributedApplication.CreateBuilder(args);
var storage = builder.AddAzureStorage("storage").RunAsEmulator(container =>
{
#pragma warning disable ASPIREPROXYENDPOINTS001 // Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.
container.WithDataBindMount().WithEndpointProxySupport(false);
#pragma warning restore ASPIREPROXYENDPOINTS001 // Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.
}); |
@sebastienros @karolz-ms it seems from above this 9.1 issue should either be closed or moved to 10.0 to track "until some down-level work is done in ServiceSpec from DCP "? |
@danmoseley agreed. I will let you/@sebastienros do the move. The underlying issue #7046 spans app model and DCP and is really more of an intersection between the two. |
@danmoseley I marked it as blocked for this reason, not the best approach but I was not sure about the decision. I am ok with closing it if @MarcinJuraszek acknowledges the recommendation works |
This submission has been automatically marked as stale because it has been marked as requiring author action but has not had any activity for 14 days. |
Is there an existing issue for this?
Describe the bug
We're using Azure Storage with Emulator and configure it to stay alive between runs using
c.WithLifetime(ContainerLifetime.Persistent)
. Despite that, every time we re-run the AppHost the ports the Emulator is exposing for the app change. This is unexpected and makes things harder than they should be. E.g. we're also using Durable Functions in our project, and use Durable Functions Monitor in VS Code to inspect the inner workings of Durable Task Framework. However, because the ports for the Storage change on every run, the Monitor breaks and we have to re-add a new connection, after getting the new set of ports from Aspire Dashboard.Expected Behavior
I would expect the Azure Storage connection string exposed by the emulator to stay stable between re-runs of App Host if configured with
WithLifetime(ContainerLifetime.Persistent)
Steps To Reproduce
Exceptions (if any)
No response
.NET Version info
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: