Skip to content

Unable to add image version to Compute Gallery image definition in cli versions 2.70.0 and 2.71.0 when using --no-wait #31198

@tiffanybacker

Description

@tiffanybacker

Describe the bug

If I use version 2.65.0 of the cli, the no-wait argument does not produce this behavior. In versions > 2.7.0, the sig image-version create command does not error, but does not succeed. Removing the --no-wait argument works as expected.

Related command

az sig image-version create --resource-group $RG --subscription ${SUBID} --gallery-name ${GNAME} --gallery-image-definition ${GIDEF} --gallery-image-version ${VNUM} --location "eastus" --target-regions eastus westus --managed-image ${IMAGERID}

Errors

There is no error -- there is just no success.

Issue script & Debug output

urllib3.connectionpool: Starting new HTTPS connection (1): login.microsoftonline.com:443
urllib3.connectionpool: https://login.microsoftonline.com:443 "GET /common//v2.0/.well-known/openid-configuration HTTP/1.1" 200 1547
msal.authority: openid_config("https://login.microsoftonline.com/common//v2.0/.well-known/openid-configuration") = {'token_endpoint': 'https://login.microsoftonline.com/common/oauth2/v2.0/token', 'token_endpoint_auth_methods_supported': ['client_secret_post', 'private_key_jwt', 'client_secret_basic'], 'jwks_uri': 'https://login.microsoftonline.com/common/discovery/v2.0/keys', 'response_modes_supported': ['query', 'fragment', 'form_post'], 'subject_types_supported': ['pairwise'], 'id_token_signing_alg_values_supported': ['RS256'], 'response_types_supported': ['code', 'id_token', 'code id_token', 'id_token token'], 'scopes_supported': ['openid', 'profile', 'email', 'offline_access'], 'issuer': 'https://login.microsoftonline.com/{tenantid}/v2.0', 'request_uri_parameter_supported': False, 'userinfo_endpoint': 'https://graph.microsoft.com/oidc/userinfo', 'authorization_endpoint': 'https://login.microsoftonline.com/common/oauth2/v2.0/authorize', 'device_authorization_endpoint': 'https://login.microsoftonline.com/common/oauth2/v2.0/devicecode', 'http_logout_supported': True, 'frontchannel_logout_supported': True, 'end_session_endpoint': 'https://login.microsoftonline.com/common/oauth2/v2.0/logout', 'claims_supported': ['sub', 'iss', 'cloud_instance_name', 'cloud_instance_host_name', 'cloud_graph_host_name', 'msgraph_host', 'aud', 'exp', 'iat', 'auth_time', 'acr', 'nonce', 'preferred_username', 'name', 'tid', 'ver', 'at_hash', 'c_hash', 'email'], 'kerberos_endpoint': 'https://login.microsoftonline.com/common/kerberos', 'tenant_region_scope': None, 'cloud_instance_name': 'microsoftonline.com', 'cloud_graph_host_name': 'graph.windows.net', 'msgraph_host': 'graph.microsoft.com', 'rbac_url': 'https://pas.windows.net'}
msal.application: Broker enabled? None
cli.azure.cli.core.auth.credential_adaptor: CredentialAdaptor.get_token: scopes=('https://management.core.windows.net//.default',), kwargs={}
cli.azure.cli.core.auth.msal_credentials: CloudShellCredential.get_token: scopes=('https://management.core.windows.net//.default',), kwargs={}
urllib3.connectionpool: Starting new HTTP connection (1): localhost:50342
urllib3.connectionpool: http://localhost:50342 "POST /oauth2/token HTTP/1.1" 200 3775
msal.token_cache: event={
"authority_type": "CLOUDSHELL",
"client_id": "04b07795-8ddb-461a-bbee-02f9e1bf7b46",
"data": {},
"response": {
"access_token": "",
"client_info": "{redacted}",
"expires_in": 931,
"id_token_claims": "
",
"token_type": "Bearer"
},
"scope": [
"https://management.core.windows.net//.default"
],
"token_endpoint": "https://login.microsoftonline.com/common/oauth2/v2.0/token"
}
cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions/{redacted}/resourceGroups/kmx-qa-centralus-cpspaas/providers/Microsoft.Compute/galleries/cps_rhel_tcbavm_secure_images/images/CPSTCBA-RHEL8-v1/versions/2.1.5?api-version=2023-07-03'
cli.azure.cli.core.sdk.policies: Request method: 'PUT'
cli.azure.cli.core.sdk.policies: Request headers:
cli.azure.cli.core.sdk.policies: 'Content-Type': 'application/json'
cli.azure.cli.core.sdk.policies: 'Accept': 'application/json'
cli.azure.cli.core.sdk.policies: 'Content-Length': '339'
cli.azure.cli.core.sdk.policies: 'x-ms-client-request-id': 'eac5999a-109b-11f0-93c2-00155dbbfddc'
cli.azure.cli.core.sdk.policies: 'CommandName': 'sig image-version create'
cli.azure.cli.core.sdk.policies: 'ParameterSetName': '--resource-group --subscription --gallery-name --gallery-image-definition --gallery-image-version --location --no-wait --target-regions --managed-image --debug'
cli.azure.cli.core.sdk.policies: 'User-Agent': 'AZURECLI/2.70.0 (RPM) azsdk-python-core/1.31.0 Python/3.9.19 (Linux-6.1.124.1-microsoft-standard-x86_64-with-glibc2.35) cloud-shell/1.0'
cli.azure.cli.core.sdk.policies: 'Authorization': '*****'
cli.azure.cli.core.sdk.policies: Request body:
cli.azure.cli.core.sdk.policies: {"location": "eastus", "properties": {"publishingProfile": {"targetRegions": [{"name": "eastus"}, {"name": "westus"}]}, "storageProfile": {"source": {"id": "/subscriptions/{redacted}/resourceGroups/kmx-dev-eastus-cpsimages/providers/Microsoft.Compute/images/EDWCPSTCBA8-image-NextGen-20250403v001"}}}, "tags": {}}
urllib3.connectionpool: Starting new HTTPS connection (1): management.azure.com:443
telemetry.main: Begin splitting cli events and extra events, total events: 1
telemetry.client: Accumulated 0 events. Flush the clients.
telemetry.main: Finish splitting cli events and extra events, cli events: 1
telemetry.save: Save telemetry record of length 4055 in cache file under /home/privileged/.azure/telemetry/20250403145710274
telemetry.main: Begin creating telemetry upload process.
telemetry.process: Creating upload process: "/usr/bin/python3.9 /usr/lib/az/lib/python3.9/site-packages/azure/cli/telemetry/init.py /home/privileged/.azure /home/privileged/.azure/telemetry/20250403145710274"
telemetry.process: Return from creating process 5943
telemetry.main: Finish creating telemetry upload process.

Expected behavior

Should get a new image version created in the gallery even when using --no-wait, but you don't.

Environment Summary

azure-cli 2.71.0

core 2.71.0
telemetry 1.1.0

Dependencies:
msal 1.31.2b1
azure-mgmt-resource 23.1.1

Python location '/usr/bin/python3.9'
Config directory '/home/esadmin/.azure'
Extensions directory '/home/esadmin/.azure/cliextensions'

Python (Linux) 3.9.20 (main, Sep 26 2024, 20:59:47)
[GCC 8.5.0 20210514 (Red Hat 8.5.0-22)]

Legal docs and information: aka.ms/AzureCliLegal

Your CLI is up-to-date.

Additional context

No response

Metadata

Metadata

Labels

Auto-AssignAuto assign by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamComputeaz vm/vmss/image/disk/snapshotcustomer-reportedIssues 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 that

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions