Azure / Azure/azure-rest-api-specs

[BUG] `VMSS` - `patchSettings.assessmentMode` cannot be set to `AutomaticByPlatform` in VMSS

Open
#28,559 4 comments 0 reactions 0 assignees View on GitHub
bug Compute Mgmt
Dominant language
TypeSpec
Stars
3.1k
Forks
5.9k
Avg merge
2d 22h
Merged PRs (30d)
444

Description

### API Spec link

https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2023-03-01/computeRPCommon.json#L1822

### API Spec version

2023-03-01

### Describe the bug

`patchSettings.assessmentMode` cannot be set to `AutomaticByPlatform` in VMSS with the following payload:

PUT /subscriptions/000000/resourceGroups/ademo-resources/providers/Microsoft.Compute/virtualMachineScaleSets/ademo-OVMSS?api-version=2023-03-01 HTTP/1.1
X-Ms-Correlation-Request-Id: b8b9b62a-3444-26f1-a708-0d0c63e0b827
{
"location": "westeurope",
"properties": {
"additionalCapabilities": {},
"orchestrationMode": "Flexible",
"platformFaultDomainCount": 2,
"virtualMachineProfile": {
"osProfile": {
"computerNamePrefix": "ademo",
"adminUsername": "adminuser",
"adminPassword": "****",
"customData": "",
"windowsConfiguration": {
"provisionVMAgent": true,
"enableAutomaticUpdates": true,
"patchSettings": {
"patchMode": "AutomaticByPlatform",
"enableHotpatching": true,
"assessmentMode": "AutomaticByPlatform"
},
"winRM": {
"listeners": [
{
"protocol": "Http"
}
]
}
}
},
"storageProfile": {
"imageReference": {
"offer": "WindowsServer",
"publisher": "MicrosoftWindowsServer",
"sku": "2022-datacenter-azure-edition-core",
"version": "latest"
},
"osDisk": {
"caching": "ReadWrite",
"writeAcceleratorEnabled": false,
"createOption": "FromImage",
"osType": "Windows",
"managedDisk": {
"storageAccountType": "Standard_LRS"
}
}
},
"networkProfile": {
"networkInterfaceConfigurations": [
{
"name": "ademo-NetworkProfile",
"properties": {
"primary": true,
"enableAcceleratedNetworking": false,
"dnsSettings": {
"dnsServers": []
},
"ipConfigurations": [
{
"name": "PrimaryIPConfiguration",
"properties": {
"subnet": {
"id": "/subscriptions/000000/resourceGroups/ademo-resources/providers/Microsoft.Network/virtualNetworks/ademo-network/subnets/internal"
},
"primary": true,
"publicIPAddressConfiguration": {
"name": "ademo-PublicIpConfiguration",
"properties": {
"idleTimeoutInMinutes": 4,
"dnsSettings": {
"domainNameLabel": "ademo-domain-label"
},
"ipTags": [],
"publicIPAddressVersion": "IPv4"
}
},
"privateIPAddressVersion": "IPv4",
"applicationGatewayBackendAddressPools": [],
"applicationSecurityGroups": [],
"loadBalancerBackendAddressPools": []
}
}
],
"enableIPForwarding": false
}
}
],
"networkApiVersion": "2020-11-01"
},
"extensionProfile": {
"extensions": [
{
"name": "ademo-HealthExtension",
"properties": {
"autoUpgradeMinorVersion": true,
"forceUpdateTag": "",
"provisionAfterExtensions": [],
"publisher": "Microsoft.ManagedServices",
"settings": {
"port": "80",
"protocol": "http",
"requestPath": "/healthEndpoint"
},
"suppressFailures": false,
"type": "ApplicationHealthWindows",
"typeHandlerVersion": "1.0"
}
}
],
"extensionsTimeBudget": "PT1H30M"
},
"priority": "Regular"
}
},
"sku": {
"name": "Standard_F2s_v2",
"tier": "Standard",
"capacity": 1
},
"tags": {}
}

Response for https://management.azure.com/subscriptions/000000/resourceGroups/ademo-resources/providers/Microsoft.Compute/virtualMachineScaleSets/ademo-OVMSS?api-version=2023-03-01:
X-Ms-Correlation-Request-Id: b8b9b62a-3444-26f1-a708-0d0c63e0b827
X-Ms-Request-Id: 0cdacd35-da17-4e76-b0d3-77b32de098b8

{
"error": {
"code": "InvalidParameter",
"message": "'patchSettings.assessmentMode' cannot be set to 'AutomaticByPlatform' as its not supported on Virtual Machine Scale Sets.",
"target": "windowsConfiguration.patchSettings.assessmentMode"
}
}

Reference:

### Expected behavior

VMSS should be deployed successfully.

### Actual behavior

The server side returned error of "'patchSettings.assessmentMode' cannot be set to 'AutomaticByPlatform' as its not supported on Virtual Machine Scale Sets."

### Reproduction Steps

create the VMSS with the payload in the description.

### Environment

_No response_

Contributor guide

Open the contributing guide

Research direction

Read the linked Compute API specification at computeRPCommon.json around line 1822 and compare its assessmentMode definition with the VMSS payload and returned InvalidParameter response. Determine whether the specification or the service behavior is inconsistent; done means the API contract and VMSS behavior agree, with the supplied reproduction succeeding or the unsupported value documented accurately.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, openapi
Domain
api, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.