Merge pull request #41034 from rootfs/gce-instance

Automatic merge from submit-queue (batch tested with PRs 41337, 41375, 41363, 41034, 41350)

use instance's Name to attach gce disk

**What this PR does / why we need it**:
fix #40427
**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #40427

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
This commit is contained in:
Kubernetes Submit Queue 2017-02-14 09:11:25 -08:00 committed by GitHub
commit 16a0a0b975

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
}