Change:
<!-- This form is for bug reports and feature requests ONLY! If you're looking for help check and the . --Is this a BUG REPORT or FEATURE REQUEST?: /kind feature The is not user friendly. There has been to make it better, but we still print in the pending message. We should change these errors to a more human readable message. For example, should be changed to something like . /sig scheduling

Discussion:
// be made to pass by removing pods, or you change an existing predicate so that // it can never be made to pass by removing pods, you need to add the predicate // failure error in nodesWherePreemptionMightHelp() in scheduler/core/generic_scheduler.go <del> ErrDiskConflict                          = newPredicateFailureError("NoDiskConflict") ErrVolumeZoneConflict                    = newPredicateFailureError("NoVolumeZoneConflict") ErrNodeSelectorNotMatch                  = newPredicateFailureError("MatchNodeSelector") ErrPodAffinityNotMatch                   = newPredicateFailureError("MatchInterPodAffinity") ErrPodAffinityRulesNotMatch              = newPredicateFailureError("PodAffinityRulesNotMatch") ErrPodAntiAffinityRulesNotMatch          = newPredicateFailureError("PodAntiAffinityRulesNotMatch") ErrExistingPodsAntiAffinityRulesNotMatch = newPredicateFailureError("ExistingPodsAntiAffinityRulesNotMatch") ErrTaintsTolerationsNotMatch             = newPredicateFailureError("PodToleratesNodeTaints") ErrPodNotMatchHostName                   = newPredicateFailureError("HostName") ErrPodNotFitsHostPorts                   = newPredicateFailureError("PodFitsHostPorts") ErrNodeLabelPresenceViolated             = newPredicateFailureError("CheckNodeLabelPresence") ErrServiceAffinityViolated               = newPredicateFailureError("CheckServiceAffinity") ErrMaxVolumeCountExceeded                = newPredicateFailureError("MaxVolumeCount") ErrNodeUnderMemoryPressure               = newPredicateFailureError("NodeUnderMemoryPressure") ErrNodeUnderDiskPressure                 = newPredicateFailureError("NodeUnderDiskPressure") ErrNodeOutOfDisk                         = newPredicateFailureError("NodeOutOfDisk") ErrNodeNotReady                          = newPredicateFailureError("NodeNotReady") ErrNodeNetworkUnavailable                = newPredicateFailureError("NodeNetworkUnavailable") ErrNodeUnschedulable                     = newPredicateFailureError("NodeUnschedulable") ErrNodeUnknownCondition                  = newPredicateFailureError("NodeUnknownCondition") ErrVolumeNodeConflict                    = newPredicateFailureError("VolumeNodeAffinityConflict") ErrVolumeBindConflict                    = newPredicateFailureError("VolumeBindingNoMatch") </del> <ins> ErrDiskConflict                          = newPredicateFailureError("NoDiskConflict", "node(s) had no available disk") ErrVolumeZoneConflict                    = newPredicateFailureError("NoVolumeZoneConflict", "node(s) had no available volume zone") ErrNodeSelectorNotMatch                  = newPredicateFailureError("MatchNodeSelector", "node(s) didn't match node selector") ErrPodAffinityNotMatch                   = newPredicateFailureError("MatchInterPodAffinity", "node(s) didn't match pod affinity/anti-affinity") ErrPodAffinityRulesNotMatch              = newPredicateFailureError("PodAffinityRulesNotMatch", "node(s) didn't match pod affinity rules") ErrPodAntiAffinityRulesNotMatch          = newPredicateFailureError("PodAntiAffinityRulesNotMatch", "node(s) didn't match pod anti-affinity rules") ErrExistingPodsAntiAffinityRulesNotMatch = newPredicateFailureError("ExistingPodsAntiAffinityRulesNotMatch", "node(s) didn't satisfy existing pods anti-affinity rules") ErrTaintsTolerationsNotMatch             = newPredicateFailureError("PodToleratesNodeTaints", "node(s) had taints that the pod didn't tolerate") ErrPodNotMatchHostName                   = newPredicateFailureError("HostName", "node(s) didn't match the requested hostname") ErrPodNotFitsHostPorts                   = newPredicateFailureError("PodFitsHostPorts", "node(s) didn't have free ports for the requested pod ports") ErrNodeLabelPresenceViolated             = newPredicateFailureError("CheckNodeLabelPresence", "node(s) didn't have the requested labels") ErrServiceAffinityViolated               = newPredicateFailureError("CheckServiceAffinity", "node(s) didn't match service affinity") ErrMaxVolumeCountExceeded                = newPredicateFailureError("MaxVolumeCount", "node(s) exceed max volume count") ErrNodeUnderMemoryPressure               = newPredicateFailureError("NodeUnderMemoryPressure", "node(s) had memory pressure") ErrNodeUnderDiskPressure                 = newPredicateFailureError("NodeUnderDiskPressure", "node(s) had disk pressure") ErrNodeOutOfDisk                         = newPredicateFailureError("NodeOutOfDisk", "node(s) were out of disk space") ErrNodeNotReady                          = newPredicateFailureError("NodeNotReady", "node(s) were not ready") ErrNodeNetworkUnavailable                = newPredicateFailureError("NodeNetworkUnavailable", "node(s) had unavailable network") ErrNodeUnschedulable                     = newPredicateFailureError("NodeUnschedulable", "node(s) were unschedulable") ErrNodeUnknownCondition                  = newPredicateFailureError("NodeUnknownCondition", "node(s) had unknown conditions") ErrVolumeNodeConflict                    = newPredicateFailureError("VolumeNodeAffinityConflict", "node(s) had volume node affinity conflict") ErrVolumeBindConflict                    = newPredicateFailureError("VolumeBindingNoMatch", "node(s) didn't find available persistent volumes to bind") </ins> // ErrFakePredicate is used for test only. The fake predicates returning false also returns error // as ErrFakePredicate. <del> ErrFakePredicate = newPredicateFailureError("FakePredicateError") </del> <ins> ErrFakePredicate = newPredicateFailureError("FakePredicateError", "Nodes failed the fake predicate") </ins> ) // InsufficientResourceError is an error type that indicates what kind of resource limit is

type PredicateFailureError struct { PredicateName string <ins> PredicateDesc string </ins> } <del> func newPredicateFailureError(predicateName string) *PredicateFailureError { return &PredicateFailureError{PredicateName: predicateName} </del> <ins> func newPredicateFailureError(predicateName, predicateDesc string) *PredicateFailureError { return &PredicateFailureError{PredicateName: predicateName, PredicateDesc: predicateDesc} </ins> } func (e *PredicateFailureError) Error() string {

} func (e *PredicateFailureError) GetReason() string { <del> return e.PredicateName </del> <ins> return e.PredicateDesc </ins> } type FailureReason struct {

}, } if strings.Contains(err.Error(), "0/3 nodes are available") { <del> if strings.Contains(err.Error(), "2 NodeUnderDiskPressure") && strings.Contains(err.Error(), "1 NodeUnderMemoryPressure") { </del> <ins> if strings.Contains(err.Error(), "2 node(s) had disk pressure") && strings.Contains(err.Error(), "1 node(s) had memory pressure") { </ins> return } }

FindBoundSatsified:   false, }, eventReason: "FailedScheduling", <del> expectError: makePredicateError("1 VolumeNodeAffinityConflict"), </del> <ins> expectError: makePredicateError("1 node(s) had volume node affinity conflict"), </ins> }, "unbound,no-matches": { volumeBinderConfig: &persistentvolume.FakeVolumeBinderConfig{

FindBoundSatsified:   true, }, eventReason: "FailedScheduling", <del> expectError: makePredicateError("1 VolumeBindingNoMatch"), </del> <ins> expectError: makePredicateError("1 node(s) didn't find available persistent volumes to bind"), </ins> }, "bound-and-unbound-unsatisfied": { volumeBinderConfig: &persistentvolume.FakeVolumeBinderConfig{

FindBoundSatsified:   false, }, eventReason: "FailedScheduling", <del> expectError: makePredicateError("1 VolumeBindingNoMatch, 1 VolumeNodeAffinityConflict"), </del> <ins> expectError: makePredicateError("1 node(s) didn't find available persistent volumes to bind, 1 node(s) had volume node affinity conflict"), </ins> }, "unbound,found-matches": { volumeBinderConfig: &persistentvolume.FakeVolumeBinderConfig{

if strings.Compare(p.Status.Conditions[0].Reason, "Unschedulable") != 0 { t.Fatalf("Failed as Pod %s reason was: %s but expected: Unschedulable", podName, p.Status.Conditions[0].Reason) } <del> if !strings.Contains(p.Status.Conditions[0].Message, "MatchNodeSelector") || !strings.Contains(p.Status.Conditions[0].Message, "VolumeNodeAffinityConflict") { t.Fatalf("Failed as Pod's %s failure message does not contain expected keywords: MatchNodeSelector, VolumeNodeAffinityConflict", podName) </del> <ins> if !strings.Contains(p.Status.Conditions[0].Message, "node(s) didn't match node selector") || !strings.Contains(p.Status.Conditions[0].Message, "node(s) had volume node affinity conflict") { t.Fatalf("Failed as Pod's %s failure message does not contain expected message: node(s) didn't match node selector, node(s) had volume node affinity conflict", podName) </ins> } if err := config.client.CoreV1().Pods(config.ns).Delete(podName, &metav1.DeleteOptions{}); err != nil { t.Fatalf("Failed to delete Pod %s: %v", podName, err)