Commit 3350eece authored by Brendan Burns's avatar Brendan Burns

Change the way we test if a disk is already attached.

Validated by manual introspection on a running GCE cluster.
parent 6a979704
......@@ -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
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment