use instance's Name to attach gce disk

Signed-off-by: rootfs <hchen@redhat.com>
pull/6/head
rootfs 2017-02-06 13:53:31 -05:00
parent a461eab321
commit b36009be7f
1 changed files with 1 additions and 1 deletions

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
}