mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 06:54:01 +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
|
||||
}
|
||||
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