mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 22:46:12 +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
|
||||
}
|
||||
for _, disk := range instance.Disks {
|
||||
if disk.InitializeParams.DiskName == diskName {
|
||||
if disk.Source == attachedDisk.Source {
|
||||
// Disk is already attached, we're good to go.
|
||||
return nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user