Skip to content

[aks-preview] CLI does not dutifully report errors due to sig image unavailability in region #10118

Description

Describe the bug

I have recently had a bad experience with the aks-preview extension, particularly when deploying a custom sig image that happened to not be replicated to the region for my deployment.

Closer inspection in the activity logs for the MC_ resource group shows the following error:

The gallery image /subscriptions//resourceGroups//providers/Microsoft.Compute/galleries//images/AzureLinuxV3gen2/versions/ is not available in westus2 region. Please contact image owner to replicate to this region, or change your requested region.

But the az cli is still hung on CreatingAgentPools: 0/2 nodes completed ..

In my opinion, az cli should handle the failure and surface it to the user.

Related command

Certain fields <omitted> for privacy reasons:

az aks create -g cameronbaird_home_westus2 -n test-image --aks-custom-headers "AKSHTTPCustomFeatures=Microsoft.ContainerService/UseCustomizedOSImage,OSImageSubscriptionID=,OSImageResourceGroup=AKSTest,OSImageGallery=,OSImageName=AzureLinuxV3gen2,OSImageVersion=,OSSKU=AzureLinux,OSDistro=CustomizedImageKata" --node-vm-size Standard_D4s_v5 --nodepool-tags AzSecPackAutoConfigReady=true --location westus2 --node-count 2

Errors

In the portal activity logs:

"The gallery image /subscriptions/<subid>/resourceGroups/<sig>/providers/Microsoft.Compute/galleries/<gallery>/images/AzureLinuxV3gen2/versions/<version> is not available in westus2 region. Please contact image owner to replicate to this region, or change your requested region."

The "bug" is that the az cli hangs forever and doesn't report this error.

Issue script & Debug output

az aks create -g <group> -n <cluster name> --aks-custom-headers "AKSHTTPCustomFeatures=Microsoft.ContainerService/UseCustomizedOSImage,..." --node-vm-size Standard_D4s_v5 --nodepool-tags AzSecPackAutoConfigReady=true --location westus2--node-count 2

Bug will trigger if your custom image is not replicated to westus2.

Expected behavior

az cli returns an error explaining that the sig image is not replicated to the --location specified.

Environment Summary

azure-cli 2.88.0

core 2.88.0
telemetry 1.1.0

Extensions:
aks-preview 21.0.0b9
azure-devops 1.0.6
confcom 2.1.0
resource-graph 2.1.1
serial-console 1.0.0b4

Dependencies:
msal 1.36.0
azure-mgmt-resource 24.0.0

Python location '/opt/az/bin/python3'
Config directory '/home/cameronbaird/.azure'
Extensions directory '/home/cameronbaird/.azure/cliextensions'

Python (Linux) 3.14.5 (main, Jun 30 2026, 10:52:46) [GCC 11.4.0]

Additional context

No response

Activity

  1. added
    bugThis issue requires a change to an existing behavior in the product in order to be resolved.
    on Jul 15, 2026
  2. added
    questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
    customer-reportedIssues that are reported by GitHub users external to the Azure organization.
    Service AttentionThis issue is responsible by Azure service team.
    on Jul 15, 2026
  3. yonzhan commented on Jul 15, 2026

    @yonzhan
    Collaborator

    Thank you for opening this issue, we will look into it.

  4. removed
    questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
    on Jul 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    AKSAuto-AssignAuto assign by botService AttentionThis issue is responsible by Azure service team.act-observability-squadbugThis issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedIssues that are reported by GitHub users external to the Azure organization.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions