adding some debug

This commit is contained in:
Scott Creeley 2017-02-23 14:09:51 -05:00 committed by root
parent 0796d5c0d8
commit 762ca8e8a9

View File

@ -374,13 +374,15 @@ func (og *operationGenerator) GenerateMountVolumeFunc(
volumeToMount.Pod,
volume.VolumeOptions{})
if newMounterErr != nil {
return nil, fmt.Errorf(
errMsg := fmt.Errorf(
"MountVolume.NewMounter failed for volume %q (spec.Name: %q) pod %q (UID: %q) with: %v",
volumeToMount.VolumeName,
volumeToMount.VolumeSpec.Name(),
volumeToMount.PodName,
volumeToMount.Pod.UID,
newMounterErr)
og.recorder.Eventf(volumeToMount.Pod, v1.EventTypeWarning, kevents.FailedMountVolume, errMsg.Error())
return nil, errMsg
}
// Get attacher, if possible