diff --git a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_managedDiskController.go b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_managedDiskController.go index e93401eb5049c..17742af77cfba 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_managedDiskController.go +++ b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_managedDiskController.go @@ -21,6 +21,7 @@ package azure import ( "context" "fmt" + "net/http" "path" "strconv" "strings" @@ -236,6 +237,10 @@ func (c *ManagedDiskController) DeleteManagedDisk(diskURI string) error { rerr = c.common.cloud.DisksClient.Delete(ctx, resourceGroup, diskName) if rerr != nil { + if rerr.HTTPStatusCode == http.StatusNotFound { + klog.V(2).Infof("azureDisk - disk(%s) is already deleted", diskURI) + return nil + } return rerr.Error() } // We don't need poll here, k8s will immediately stop referencing the disk