mirror of
https://github.com/kubernetes/kubernetes.git
synced 2026-05-28 04:04:39 -04: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
1 changed files with 1 additions and 1 deletions
|
|
@ -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 a new issue