mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 17:30:00 +00:00
Merge pull request #9542 from brendandburns/validate
Change the way we test if a disk is already attached.
This commit is contained in:
commit
99bf48dc2f
@ -699,7 +699,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