No need to log empty string

This commit is contained in:
root 2016-05-17 10:01:37 -04:00
parent 445deb21e6
commit 74901ae150

View File

@ -151,7 +151,7 @@ func (c *MaxPDVolumeCountChecker) filterVolumes(volumes []api.Volume, namespace
} else if vol.PersistentVolumeClaim != nil { } else if vol.PersistentVolumeClaim != nil {
pvcName := vol.PersistentVolumeClaim.ClaimName pvcName := vol.PersistentVolumeClaim.ClaimName
if pvcName == "" { if pvcName == "" {
return fmt.Errorf("PersistentVolumeClaim had no name: %q", pvcName) return fmt.Errorf("PersistentVolumeClaim had no name")
} }
pvc, err := c.pvcInfo.GetPersistentVolumeClaimInfo(namespace, pvcName) pvc, err := c.pvcInfo.GetPersistentVolumeClaimInfo(namespace, pvcName)
if err != nil { if err != nil {
@ -304,7 +304,7 @@ func (c *VolumeZoneChecker) predicate(pod *api.Pod, nodeInfo *schedulercache.Nod
if volume.PersistentVolumeClaim != nil { if volume.PersistentVolumeClaim != nil {
pvcName := volume.PersistentVolumeClaim.ClaimName pvcName := volume.PersistentVolumeClaim.ClaimName
if pvcName == "" { if pvcName == "" {
return false, fmt.Errorf("PersistentVolumeClaim had no name: %q", pvcName) return false, fmt.Errorf("PersistentVolumeClaim had no name")
} }
pvc, err := c.pvcInfo.GetPersistentVolumeClaimInfo(namespace, pvcName) pvc, err := c.pvcInfo.GetPersistentVolumeClaimInfo(namespace, pvcName)
if err != nil { if err != nil {