use instance's Name to attach gce disk

Signed-off-by: rootfs <hchen@redhat.com>
This commit is contained in:
rootfs 2017-02-06 13:53:31 -05:00
parent a461eab321
commit b36009be7f

View File

@ -2588,7 +2588,7 @@ func (gce *GCECloud) AttachDisk(diskName string, nodeName types.NodeName, readOn
}
attachedDisk := gce.convertDiskToAttachedDisk(disk, readWrite)
attachOp, err := gce.service.Instances.AttachDisk(gce.projectID, disk.Zone, instanceName, attachedDisk).Do()
attachOp, err := gce.service.Instances.AttachDisk(gce.projectID, disk.Zone, instance.Name, attachedDisk).Do()
if err != nil {
return err
}