Skip to content

Commit

Permalink
chore: support attach operations after premiumV2 disk migration
Browse files Browse the repository at this point in the history
  • Loading branch information
Lana Andreasyan committed Oct 23, 2024
1 parent 9c1f673 commit 0124abf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/azuredisk/azure_controller_common.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,10 @@ func (c *controllerCommon) AttachDisk(ctx context.Context, diskName, diskURI str
return -1, fmt.Errorf("state of disk(%s) is %s, not in expected %s state", diskURI, *disk.Properties.DiskState, armcompute.DiskStateUnattached)
}
}
if disk.SKU != nil && disk.SKU.Name != nil && *disk.SKU.Name == armcompute.DiskStorageAccountTypesPremiumV2LRS {
klog.V(2).Infof("disk(%s) is PremiumV2LRS and only supports None caching mode", diskURI)
cachingMode = armcompute.CachingTypesNone
}

if v, ok := disk.Tags[WriteAcceleratorEnabled]; ok {
if v != nil && strings.EqualFold(*v, "true") {
Expand Down

0 comments on commit 0124abf

Please sign in to comment.