question

DeannaDelapasse-2890 avatar image
0 Votes"
DeannaDelapasse-2890 asked karishmatiwari-msft edited

C# Fluent SDK fails to create container group/instance intermittently

We are trying to create some container groups (with one instance each), but we are getting intermittent errors as listed below. It waits for 30 minutes and then fails. We're creating an Azure ticket, but would love any ideas on what is going on.

: IPMonitor.Jobs.NotificationJob[0]
Error on CreateContainerACR: Microsoft.Rest.Azure.CloudException: Long running operation failed with status 'Failed'.
Additional Info:'Prepare network succeeded.;Join network succeeded.;Delegate subnet succeeded.;
Provision network interface failed for "xxxxxxxxx"/"sn-use-paas-dev"/"yyyyyyyyyyyyyyyy":
Failed to create network container.;Provision network interface succeeded.;Subscription deployment didn't reach a successful provisioning state after '00:30:00'.'
at Microsoft.Rest.ClientRuntime.Azure.LRO.AzureLRO`2.CheckForErrors()
at Microsoft.Rest.ClientRuntime.Azure.LRO.PutLRO`2.CheckForErrors()
at Microsoft.Rest.ClientRuntime.Azure.LRO.AzureLRO`2.StartPollingAsync()
at Microsoft.Rest.ClientRuntime.Azure.LRO.AzureLRO`2.BeginLROAsync()
at Microsoft.Rest.Azure.AzureClientExtensions.GetLongRunningOperationResultAsync[TBody,THeader](IAzureClient client, AzureOperationResponse`2 response, Dictionary`2 customHeaders, CancellationToken cancellationToken)

We're using the Microsoft Fluent SDK:

var containerGroup = await azure.ContainerGroups.Define(aCREnvVars.ContainerGroupName + suffix)
.WithRegion("East US")
.WithExistingResourceGroup(aCREnvVars.resourceGrop)
.WithLinux()
.WithPrivateImageRegistry(aCREnvVars.acrLoginServer, aCREnvVars.acrName, aCREnvVars.acrPassword)
.DefineVolume(aCREnvVars.VolumeName)
.WithExistingReadWriteAzureFileShare(aCREnvVars.azure_file_volume_share_name)
.WithStorageAccountName(aCREnvVars.azure_file_volume_account_name)
.WithStorageAccountKey(aCREnvVars.azure_file_volume_account_key)
.Attach()
.DefineContainerInstance(aCREnvVars.ContainerGroupName)
.WithImage(aCREnvVars.acrLoginServer + "/" + aCREnvVars.PythonImageName)
.WithExternalTcpPort(80)
.WithCpuCoreCount(CpuCoreCount)
.WithMemorySizeInGB(MemorySizeInGB)
.WithEnvironmentVariables(envVar)
.WithVolumeMountSetting(aCREnvVars.VolumeName, aCREnvVars.MountPath)
.Attach()
.WithRestartPolicy(ContainerGroupRestartPolicy.Never)
.WithNetworkProfileId(aCREnvVars.network_profile_subscriptions, aCREnvVars.resourceGrop, aCREnvVars.network_profile_name)
.CreateAsync();

azure-container-instancesazure-container-registry
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

From my experience on previous issues like this, this would require deeper investigation from the backend and thus I would request you to continue the investigation with the Support engineer on the open support ticket. Thanks.

0 Votes 0 ·

0 Answers