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:
Brendan Burns 2015-06-09 17:50:52 -07:00
parent 6a979704b7
commit 3350eecedf

View File

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