Azure-Samples / aks-store-demo

Sample microservices app for AKS demos, tutorials, and experiments
MIT License
136 stars 216 forks source link

[BUG] Error: OverconstrainedAllocationRequest in AKS VM configuration #115

Closed nathaniel-msft closed 5 months ago

nathaniel-msft commented 5 months ago

Describe the bug

Deployment fails due to an error with the Azure Kubernetes Cluster configuration.

To Reproduce Steps to reproduce the behavior:

  1. Run azd up
  2. In the deployment, terraform will fail.
  3. See error code message: OverconstrainedAllocationRequest
Message="Code=\"OverconstrainedAllocationRequest\" Message=\"Allocation failed. 
VM(s) with the following constraints cannot be allocated, because the condition is too restrictive. Please remove some constraints and try again. Constraints applied are:\\n - Networking Constraints (such as Accelerated Networking or IPv6)\\n - VM Size\\n\" Target=\"0\""
Details=[{"code":"OverconstrainedAllocationRequest","message":"Allocation failed. VM(s) with the following constraints cannot be allocated, because the condition is too restrictive. Please remove some constraints and try again. Constraints applied are:\n - Networking Constraints (such as Accelerated Networking or IPv6)\n - VM Size\n","target":"0"}]

Expected behavior A clear and concise description of what you expected to happen.

Expected deployment to run and not fail on the terraform deployment step.

Machine Details Ran and tested on GitHub Codespaces

Additional context

Can you also test to see if this error occurs on Bicep as well? They both run the same VM specs: Standard_D4s_v4 with a node_count of 3.

nathaniel-msft commented 5 months ago

I can confirm this deployment script was working 5 days ago, so a change within that timespan broke the deployment.

pauldotyu commented 5 months ago

Thanks for raising this @nathaniel-msft. Just to confirm, did this deployment script work in the same subscription? This feels like a subscription-related issue. Can you try either deploying a standalone Standard_D4s_v4 VM in the subscription or try running the azd up command from a different sub to see if you get the same result?

nathaniel-msft commented 5 months ago

Yes, it was using the same subscription.

nathaniel-msft commented 5 months ago

After testing, it was determined to be a policy related bug on specifically US East 2. There's no need for a code change in the repo, so I'll close this and update the docs to avoid US East 2 until the bug is patched.