Log node name when error attaching volume

This commit is contained in:
Matthew Wong 2017-04-27 13:58:38 -04:00
parent becd626c8e
commit c8278a8ac5
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
}