bosh-azure-cpi-release icon indicating copy to clipboard operation
bosh-azure-cpi-release copied to clipboard

create_disk is unable to determine the correct default storage type for Azure's latest VM types

Open s4heid opened this issue 7 months ago • 1 comments

Versions

CPI Version: v52.0.0

Issue Details

The create_disk method uses a regex pattern to determine if a given VM type supports Premium storage in Azure. The regex pattern only matches VM types <= v3. Since Azure released new VM types (> v3), deployments using these newer VM types would always be using Standard storage for the persistent disks. This can lead to very surprising side effects.

Example: When upgrading a deployment of v3 instance types to v4 instance types and afterwards scaling up the instances by factor 2, you would end up with a deployment of only v4 instance types, but half of them would be using Standard disks and the other half Premium disks. An operators nightmare.. :)

In general, relying on a regex pattern to determine which storage type should be used is error-prone and difficult to maintain. A better approach would be to use the Resource SKU API.

@MSSedusch - thank you for helping identify this issue.

s4heid avatar Mar 17 '25 21:03 s4heid