mirror of
https://github.com/kubernetes/kubernetes.git
synced 2026-06-09 08:55:55 -04:00
Merge pull request #102165 from andyzhangx/automated-cherry-pick-of-#102083-upstream-release-1.19
Automated cherry pick of #102083: fix: delete non existing disk issue
This commit is contained in:
commit
3afbb7b5fd
1 changed files with 5 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue