Commit 19795ea7 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

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 ```
parents acca01bc c8278a8a
...@@ -70,7 +70,7 @@ func (attacher *awsElasticBlockStoreAttacher) Attach(spec *volume.Spec, nodeName ...@@ -70,7 +70,7 @@ func (attacher *awsElasticBlockStoreAttacher) Attach(spec *volume.Spec, nodeName
// succeeds in that case, so no need to do that separately. // succeeds in that case, so no need to do that separately.
devicePath, err := attacher.awsVolumes.AttachDisk(volumeID, nodeName, readOnly) devicePath, err := attacher.awsVolumes.AttachDisk(volumeID, nodeName, readOnly)
if err != nil { 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 return "", err
} }
......
...@@ -73,7 +73,7 @@ func (attacher *photonPersistentDiskAttacher) Attach(spec *volume.Spec, nodeName ...@@ -73,7 +73,7 @@ func (attacher *photonPersistentDiskAttacher) Attach(spec *volume.Spec, nodeName
// TODO: if disk is already attached? // TODO: if disk is already attached?
err = attacher.photonDisks.AttachDisk(volumeSource.PdID, nodeName) err = attacher.photonDisks.AttachDisk(volumeSource.PdID, nodeName)
if err != nil { 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 return "", err
} }
......
...@@ -77,7 +77,7 @@ func (attacher *vsphereVMDKAttacher) Attach(spec *volume.Spec, nodeName types.No ...@@ -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. // succeeds in that case, so no need to do that separately.
_, diskUUID, err := attacher.vsphereVolumes.AttachDisk(volumeSource.VolumePath, nodeName) _, diskUUID, err := attacher.vsphereVolumes.AttachDisk(volumeSource.VolumePath, nodeName)
if err != nil { 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 return "", err
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment