Skip to content

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

Open
@s4heid

Description

@s4heid

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Waiting for Changes | Open for Contribution

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions