Skip to content

Commit

Permalink
Merge pull request #107406 from andyzhangx/delete-disk-error
Browse files Browse the repository at this point in the history
fix: delete non existing Azure disk issue
  • Loading branch information
k8s-ci-robot committed Jan 15, 2022
2 parents a4931cc + 8f9846c commit 7bde4ba
Showing 1 changed file with 4 additions and 0 deletions.
Expand Up @@ -229,6 +229,10 @@ func (c *ManagedDiskController) DeleteManagedDisk(diskURI string) error {

disk, rerr := c.common.cloud.DisksClient.Get(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()
}

Expand Down

0 comments on commit 7bde4ba

Please sign in to comment.