microsoft / microsoft/aspire-samples
DatabaseMigrations service does not work in ACA
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 1.2k
- Forks
- 345
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 30
Description
Hi, I've implemented the DatabaseMigrations sample in my solution.
It works fine on my development machine
When I deploy via azd up, it gets deployed to aca.
But the migration service never stops.
And console logs are strange:
{"EventId":0,"LogLevel":"Information","Category":"Program","Message":"Entering app startup."}
{"EventId":0,"LogLevel":"Information","Category":"Program","Message":"Using settings file: /var/msi/settings/capps.json"}
{"EventId":0,"LogLevel":"Information","Category":"Program","Message":"Settings file not found. Creating one.."}
{"EventId":0,"LogLevel":"Information","Category":"Program","Message":"Copying from local file: capps.json"}
{"EventId":0,"LogLevel":"Information","Category":"Program","Message":"Found initial lifecycle value: main."}
{"EventId":0,"LogLevel":"Information","Category":"Microsoft.Azure.AppService.TokenService.ManagedIdentityInformationProvider.ConfigurationManagedIdentityInformationProvider","Message":"Configuration update started. Site: migrations","CorrelationId":"00000000-0000-0000-0000-000000000000","SiteName":"migrations"}
{"EventId":0,"LogLevel":"Information","Category":"Microsoft.Azure.AppService.TokenService.ManagedIdentityInformationProvider.ConfigurationManagedIdentityInformationProvider","Message":"Token service settings configuration found. Setting lifecycle to main","CorrelationId":"00000000-0000-0000-0000-000000000000"}
{"EventId":0,"LogLevel":"Information","Category":"Microsoft.Azure.AppService.TokenService.CertificateProvider.P12FileCertificateProvider","Message":"Start load certificate. Client ID: 8a3659e3-a1f0-47a2-a2ec-bfd712931f48. Name: 1987e263-3d81-41b3-b019-02ae4acd1ce6","CorrelationId":"00000000-0000-0000-0000-000000000000"}
{"EventId":0,"LogLevel":"Information","Category":"Microsoft.Azure.AppService.TokenService.CertificateProvider.P12FileCertificateProvider","Message":"Finished loading certificate. Client ID: 8a3659e3-a1f0-47a2-a2ec-bfd712931f48. Name: 1987e263-3d81-41b3-b019-02ae4acd1ce6","CorrelationId":"00000000-0000-0000-0000-000000000000"}
{"EventId":0,"LogLevel":"Information","Category":"Microsoft.Azure.AppService.TokenService.ManagedIdentityInformationProvider.ConfigurationManagedIdentityInformationProvider","Message":"[UserAssigned] Added Identity with ClientId: 8a3659e3-a1f0-47a2-a2ec-bfd712931f48 | ResourceId: /subscriptions/86acb8d9-8100-431b-a38c-bc9fc7420798/resourcegroups/rg-spikes-dev/providers/Microsoft.ManagedIdentity/userAssignedIdentities/mi-j7pcrz7inuv2k | Lifecycle: all","CorrelationId":"00000000-0000-0000-0000-000000000000","IdentityType":"UserAssigned","ClientId":"8a3659e3-a1f0-47a2-a2ec-bfd712931f48","ResourceId":"/subscriptions/86acb8d9-8100-431b-a38c-bc9fc7420798/resourcegroups/rg-spikes-dev/providers/Microsoft.ManagedIdentity/userAssignedIdentities/mi-j7pcrz7inuv2k","Lifecycle":"all"}
{"EventId":0,"LogLevel":"Information","Category":"Microsoft.Azure.AppService.TokenService.ManagedIdentityInformationProvider.ConfigurationManagedIdentityInformationProvider","Message":"[SiteMetadataProvider] AddOrUpdateSite - SiteName: migrations | Secret: 8aa88c65-7968-4c0c-8e11-7a5431be43b5 | Type: Msi","CorrelationId":"00000000-0000-0000-0000-000000000000","SiteName":"migrations","Secret":"8aa88c65-7968-4c0c-8e11-7a5431be43b5","Type":"Msi"}
{"EventId":0,"LogLevel":"Information","Category":"Microsoft.Azure.AppService.TokenService.Startup","Message":"Starting TokenService version 2.0.2.16 from /app with the ContainerApps SKU. Environment check: IsLinuxDedicated: False, IsLinuxConsumption: False, IsContainerApps: True, IsContainerAppSystemService: False, IsWindows: False.","CorrelationId":"00000000-0000-0000-0000-000000000000"}
{"EventId":0,"LogLevel":"Information","Category":"Microsoft.Azure.AppService.TokenService.Middleware.CorrelationIdMiddleware","Message":"Request to TokenService: Endpoint localhost:42356, Port 42356, Path /healthcheck, Query ?api-version=2021-08-01, Method GET, UserAgent curl/8.8.0","CorrelationId":"5f2d3517-aae2-4d3a-83ca-d7b1761cd3b2","Endpoint":"localhost:42356","Port":42356,"Path":"/healthcheck","Query":"?api-version=2021-08-01","Method":"GET","UserAgent":"curl/8.8.0"}
{"EventId":0,"LogLevel":"Information","Category":"Microsoft.Azure.AppService.TokenService.Middleware.CorrelationIdMiddleware","Message":"Returning response for Site , Endpoint localhost:42356, Port 42356, Path /healthcheck, Method GET, Result = 200, Duration: 610","CorrelationId":"5f2d3517-aae2-4d3a-83ca-d7b1761cd3b2","SiteName":"","Endpoint":"localhost:42356","Port":42356,"Path":"/healthcheck","Method":"GET","Result":"200","DurationInMs":610}
What can be wrong?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue mentions the DatabaseMigrations sample and deployment with azd up to Azure Container Apps, but no files or tests. Start by locating that sample and comparing its local and ACA startup behavior and logs. Done means identifying why the migration service does not stop after deployment and documenting a reproducible fix or clear diagnosis.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, csharp
- Domain
- backend, cloud, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100