-
Notifications
You must be signed in to change notification settings - Fork 3.4k
azure-cli: crash when handling InvalidTemplateDeployment (response already consumed) #32952
Copy link
Copy link
Open
Labels
Auto-AssignAuto assign by botAuto assign by botComputeaz vm/vmss/image/disk/snapshotaz vm/vmss/image/disk/snapshotError MessagesPossible-SolutionService AttentionThis issue is responsible by Azure service team.This issue is responsible by Azure service team.Similar-Issueact-observability-squadcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
Milestone
Metadata
Metadata
Assignees
Labels
Auto-AssignAuto assign by botAuto assign by botComputeaz vm/vmss/image/disk/snapshotaz vm/vmss/image/disk/snapshotError MessagesPossible-SolutionService AttentionThis issue is responsible by Azure service team.This issue is responsible by Azure service team.Similar-Issueact-observability-squadcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
Title: azure-cli: crash when handling InvalidTemplateDeployment (response already consumed)
Description:
When running
az vm createthe deployment fails with an ARM error (SkuNotAvailable). While handling the ARM template error the CLI hits an internal exception: "The content for this response was already consumed" which leads to an AttributeError and a RuntimeError. The CLI should surface the ARM inner error instead of crashing while trying to read the consumed response.Environment:
Relevant debug excerpt (tail of
~/az_vm_create_debug.log):What I expected:
Steps to reproduce:
eastussubscription has capacity restrictions forStandard_DS1_v2(or simulate failure by requesting an unavailable SKU).az vm createcommand above.Attachments / Logs:
~/az_vm_create_debug.log(tail included above)az --versionoutput included in the debug logSuggested fix:
inner_exceptionor already-consumed response when building CLI error messages; prefer to fall back to the HttpResponseError.message or the JSON body captured earlier.Please let me know if you want the full
az_vm_create_debug.logattached; I can paste it or provide a link.