Merge pull request #45042 from wongma7/attaching-log

Automatic merge from submit-queue

Log node name when error attaching volume

Helps with debugging to know immediately which node the volume failed to atach to. Went through all plugins, added this to 3. @gnufied
```release-note
NONE
```
pull/6/head
Kubernetes Submit Queue 2017-04-27 23:04:05 -07:00 committed by GitHub
commit 19795ea7c3
3 changed files with 3 additions and 3 deletions

View File

@ -70,7 +70,7 @@ func (attacher *awsElasticBlockStoreAttacher) Attach(spec *volume.Spec, nodeName
// succeeds in that case, so no need to do that separately.
devicePath, err := attacher.awsVolumes.AttachDisk(volumeID, nodeName, readOnly)
if err != nil {
glog.Errorf("Error attaching volume %q: %+v", volumeID, err)
glog.Errorf("Error attaching volume %q to node %q: %+v", volumeID, nodeName, err)
return "", err
}

View File

@ -73,7 +73,7 @@ func (attacher *photonPersistentDiskAttacher) Attach(spec *volume.Spec, nodeName
// TODO: if disk is already attached?
err = attacher.photonDisks.AttachDisk(volumeSource.PdID, nodeName)
if err != nil {
glog.Errorf("Error attaching volume %q: %+v", volumeSource.PdID, err)
glog.Errorf("Error attaching volume %q to node %q: %+v", volumeSource.PdID, nodeName, err)
return "", err
}

View File

@ -77,7 +77,7 @@ func (attacher *vsphereVMDKAttacher) Attach(spec *volume.Spec, nodeName types.No
// succeeds in that case, so no need to do that separately.
_, diskUUID, err := attacher.vsphereVolumes.AttachDisk(volumeSource.VolumePath, nodeName)
if err != nil {
glog.Errorf("Error attaching volume %q: %+v", volumeSource.VolumePath, err)
glog.Errorf("Error attaching volume %q to node %q: %+v", volumeSource.VolumePath, nodeName, err)
return "", err
}