mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 03:41:45 +00:00
Merge pull request #102892 from gnufied/no-error-on-canonical-path
Do not throw error when we can't get canonical path
This commit is contained in:
commit
3be88d5d0f
@ -936,11 +936,10 @@ func (vs *VSphere) AttachDisk(vmDiskPath string, storagePolicyName string, nodeN
|
|||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
|
|
||||||
// try and get canonical path for disk and if we can't throw error
|
// try and get canonical path for disk and if we can't use provided vmDiskPath
|
||||||
vmDiskPath, err = getcanonicalVolumePath(ctx, vm.Datacenter, vmDiskPath)
|
canonicalPath, pathFetchErr := getcanonicalVolumePath(ctx, vm.Datacenter, vmDiskPath)
|
||||||
if err != nil {
|
if canonicalPath != "" && pathFetchErr == nil {
|
||||||
klog.Errorf("failed to get canonical path for %s on node %s: %v", vmDiskPath, convertToString(nodeName), err)
|
vmDiskPath = canonicalPath
|
||||||
return "", err
|
|
||||||
}
|
}
|
||||||
|
|
||||||
diskUUID, err = vm.AttachDisk(ctx, vmDiskPath, &vclib.VolumeOptions{SCSIControllerType: vclib.PVSCSIControllerType, StoragePolicyName: storagePolicyName})
|
diskUUID, err = vm.AttachDisk(ctx, vmDiskPath, &vclib.VolumeOptions{SCSIControllerType: vclib.PVSCSIControllerType, StoragePolicyName: storagePolicyName})
|
||||||
|
Loading…
Reference in New Issue
Block a user