Skip to content

'az vmss extension set' does not update an existing extension anymore #33751

Description

Describe the bug

With the latest azure cli version (2.88.0), the command 'az vmss extension set' does not update an existing extension on a virtual machine scale set anymore.

This is a breaking change that was introduced with the latest azure cli version 2.88.0.
On earlier versions, it correctly updated the already existing vmss extension with the settings as set in the command.
This is also how it is documented here: https://learn.microsoft.com/en-us/cli/azure/vmss/extension?view=azure-cli-latest#az-vmss-extension-set
It says: 'Add an extension to a vmss or UPDATE AN EXISTING extension.'
This is no longer the case since it now returns this error.

Related command

az vmss extension set

Errors

(BadRequest) Multiple VMExtensions per handler not supported for OS type 'Linux'. VMExtension 'myScript' with handler 'Microsoft.Azure.Extensions.CustomScript' already added or specified in input.
Code: BadRequest
Message: Multiple VMExtensions per handler not supported for OS type 'Linux'. VMExtension 'myScript' with handler 'Microsoft.Azure.Extensions.CustomScript' already added or specified in input.

Issue script & Debug output

az vmss extension set --vmss-name myVMSS --resource-group myRG --name CustomScript --extension-instance-name myScript --version 2.1 --publisher Microsoft.Azure.Extensions --settings "..." --force-update

Expected behavior

If the extension custom script already exists, it should be updated. That's how it was working before version 2.88.0.
This is also how it is documented here: https://learn.microsoft.com/en-us/cli/azure/vmss/extension?view=azure-cli-latest#az-vmss-extension-set
It says: 'Add an extension to a vmss or UPDATE AN EXISTING extension.'

With this bug it is no longer possible to update the extension, since there is also no other command that can be used to update an existing custom script extension.

Environment Summary

az version
{
"azure-cli": "2.88.0",
"azure-cli-core": "2.88.0",
"azure-cli-telemetry": "1.1.0",
"extensions": {
"application-insights": "0.1.16",
"redisenterprise": "0.1.2"
}
}

Additional context

The returned error about the constraint of only having one customScript extension is known and ok.
However, since we have rolling updates enabled on this vmss, we can not do a work around by deleting the script and add it again, since this would lead to downtime / time where we can not reach the deployed api on the machines.
So we need the functionality as documented and as it was working before.

Metadata

Metadata

Labels

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

Relationships

None yet

Development

No branches or pull requests

Issue actions