Skip to content
This repository has been archived by the owner on Nov 1, 2023. It is now read-only.

handle SkuNotAvailable errors when creating VM Scalesets #557

Merged
merged 2 commits into from
Feb 17, 2021

Conversation

bmc-msft
Copy link
Contributor

Example exception that is now handled:

Exception while executing function: Functions.timer_workers 
Result: Failure
Exception: ResourceExistsError: (SkuNotAvailable) The requested size for resource '/subscriptions/GUID/resourceGroups/RESOURCE_GROUP_NAME/providers/Microsoft.Compute/virtualMachineScaleSets/GUID' is currently not available in location 'REGION' zones '' for subscription 'GUID'. Please try another size or deploy to a different location or zones. See https://aka.ms/azureskunotavailable for details.

NOTE: This change uses the repr of the exception to remove the complexity of searching through nested ODataV4Format errors that make up the exception record.

@bmc-msft
Copy link
Contributor Author

NOTE: On a subscription where the VM quotas are maxed out, the integration tests fail appropriately with the following error:

ERROR:integration:task scaleset failed: linux-trivial-crash-afl - generic_crash_report - creation_failed (code=<ErrorCode.VM_CREATE_FAILED: 461> errors=["creating vmss: (SkuNotAvailable) The requested size for resource '/subscriptions/GUID/resourceGroups/GROUP/providers/Microsoft.Compute/virtualMachineScaleSets/GUID' is currently not available in location 'REGION' zones '' for subscription 'GUID'. Please try another size or deploy to a different location or zones. See https://aka.ms/azureskunotavailable for details."])

@bmc-msft bmc-msft merged commit 2796292 into microsoft:main Feb 17, 2021
@bmc-msft bmc-msft deleted the handle-sku-not-available-errors branch February 17, 2021 21:52
@ghost ghost locked as resolved and limited conversation to collaborators Apr 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants