mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-05 02:09:56 +00:00
Change the way we test if a disk is already attached.
Validated by manual introspection on a running GCE cluster.
This commit is contained in:
parent
6a979704b7
commit
3350eecedf
@ -695,7 +695,7 @@ func (gce *GCECloud) AttachDisk(diskName string, readOnly bool) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
for _, disk := range instance.Disks {
|
for _, disk := range instance.Disks {
|
||||||
if disk.InitializeParams.DiskName == diskName {
|
if disk.Source == attachedDisk.Source {
|
||||||
// Disk is already attached, we're good to go.
|
// Disk is already attached, we're good to go.
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user