mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-07 03:03:59 +00:00
Fix gce.getDiskByNameUnknownZone logic.
This commit is contained in:
parent
5abbc24a86
commit
d69ccd5c8c
@ -2245,6 +2245,11 @@ func (gce *GCECloud) getDiskByNameUnknownZone(diskName string) (*gceDisk, error)
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
// findDiskByName returns (nil,nil) if the disk doesn't exist, so we can't
|
||||||
|
// assume that a disk was found unless disk is non-nil.
|
||||||
|
if disk == nil {
|
||||||
|
continue
|
||||||
|
}
|
||||||
if found != nil {
|
if found != nil {
|
||||||
return nil, fmt.Errorf("GCE persistent disk name was found in multiple zones: %q", diskName)
|
return nil, fmt.Errorf("GCE persistent disk name was found in multiple zones: %q", diskName)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user