We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 81e96bf + 97a5fc0 commit 8c2474fCopy full SHA for 8c2474f
staging/src/k8s.io/legacy-cloud-providers/vsphere/vclib/diskmanagers/vdm.go
@@ -70,6 +70,11 @@ func (diskManager virtualDiskManager) Create(ctx context.Context, datastore *vcl
70
taskInfo, err := task.WaitForResult(ctx, nil)
71
vclib.RecordvSphereMetric(vclib.APICreateVolume, requestTime, err)
72
if err != nil {
73
+ if isAlreadyExists(diskManager.diskPath, err) {
74
+ // The disk already exists, log info message and return success
75
+ klog.V(vclib.LogLevel).Infof("File: %v already exists", diskManager.diskPath)
76
+ return diskManager.diskPath, nil
77
+ }
78
klog.Errorf("Failed to complete virtual disk creation: %s. err: %+v", diskManager.diskPath, err)
79
return "", err
80
}
0 commit comments