Skip to content
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

az vm list-skus filtering out VM sizes that are available regionally when they are restricted in all zones #23341

Closed
arsenvlad opened this issue Jul 26, 2022 · 3 comments · Fixed by #23457
Assignees
Labels
Auto-Assign Auto assign by bot Azure CLI Team The command of the issue is owned by Azure CLI team bug This issue requires a change to an existing behavior in the product in order to be resolved. Compute az vm/vmss/image/disk/snapshot
Milestone

Comments

@arsenvlad
Copy link

Related command
az vm list-skus

Describe the bug
The current logic for "vm list-skus" is filtering out VM sizes that are available regionally when they are restricted in all zones. Relevant code line is this

# This SKU is not available only if all zones are restricted

This does not appear to be correct behavior, since a VM size maybe restricted for all 3 zones "zonally" but still be available for a subscription when deployed "regionally".

  • When restrictionInfo.type=”Zone” it means it is a zonal restriction for the subscription: i.e., not available to deploy this VM size in the subscription in the zones specified in the restrictionInfo properties (and could be all 3 zones)
  • When restrictionInfo.type=”Location” it means it is a regional restriction for the subscription: i.e., not available to deploy this VM size in the subscription in the region even when not specifying a zone

To Reproduce
Execute "az vm list-skus" on an Azure subscription that has some VM sizes that are restricted zonally in all 3 zones but are not restricted regionally. Review the output to see that the VMs sizes are not listed.

As expected, all VM sizes are returned when using the --all parameter, but the available sizes should also be returned without using --all if these sizes are not restricted regionally as well as zonally.

Expected behavior
VM sizes that are available for a subscription, either regionally or zonally, should be returned by the "az vm list-skus" command even without including the --all parameter.

@ghost ghost added the Compute az vm/vmss/image/disk/snapshot label Jul 26, 2022
@ghost ghost added this to the Backlog milestone Jul 26, 2022
@ghost ghost assigned zhoxing-ms Jul 26, 2022
@ghost ghost added the Auto-Assign Auto assign by bot label Jul 26, 2022
@yonzhan
Copy link
Collaborator

yonzhan commented Jul 27, 2022

@zhoxing-ms for awareness

@yanzhudd
Copy link
Contributor

yanzhudd commented Aug 8, 2022

Hello @arsenvlad, we will fix this issue in #23457, could you please help to confirm if it meets your expectations?
https://github.com/Azure/azure-cli/pull/23457/files

@arsenvlad
Copy link
Author

Thanks. I left a comment on the PR #23457

@yonzhan yonzhan added Azure CLI Team The command of the issue is owned by Azure CLI team bug This issue requires a change to an existing behavior in the product in order to be resolved. labels Aug 14, 2022
zhoxing-ms pushed a commit that referenced this issue Aug 30, 2022
…hat are available regionally when they are restricted in all zones (#23457)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Assign Auto assign by bot Azure CLI Team The command of the issue is owned by Azure CLI team bug This issue requires a change to an existing behavior in the product in order to be resolved. Compute az vm/vmss/image/disk/snapshot
Projects
None yet
4 participants