Merge pull request #9542 from brendandburns/validate

Change the way we test if a disk is already attached.
This commit is contained in:
Brendan Burns 2015-06-09 22:00:06 -07:00
commit 99bf48dc2f

View File

@ -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
} }