Change:
<!-- Please only use this template for submitting enhancement requests --What would you like to be : 1) Increase the log level of info logs to "v=2" when the scheduler or a node from its cache. 2) Increase the log level of info logs to "v=2" when the scheduler can't schedule a pod , , and add a log message for 2) report memory/cpu status of . Why is this needed: With cluster autoscaler now being used in production by some vendors, we want to have more visibility to events that could be related to the auto scaler to help debug customer issues. /sig scheduling /priority important-soon /assign
GitHub didn't allow me to assign the following users: congliu01. Note that only , repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time. For more information please see <detailsIn response to : <!-- Please only use this template for submitting enhancement requests --1) Increase the log level of info logs to "v=2" when the scheduler or a node from its cache. 2) report memory/cpu status of . Why is this needed: With cluster autoscaler now being used in production by some vendors, we want to have more visibility to events that could be related to the auto scaler to help debug customer issues. /priority important-soon /assign </details
will consider this assigned to you.
/assign

Discussion:
func MakeDefaultErrorFunc(client clientset.Interface, podQueue internalqueue.SchedulingQueue, schedulerCache internalcache.Cache, stopEverything <-chan struct{}) func(pod *v1.Pod, err error) { return func(pod *v1.Pod, err error) { if err == core.ErrNoNodesAvailable { <del> klog.V(4).Infof("Unable to schedule %v/%v: no nodes are registered to the cluster; waiting", pod.Namespace, pod.Name) </del> <ins> klog.V(2).Infof("Unable to schedule %v/%v: no nodes are registered to the cluster; waiting", pod.Namespace, pod.Name) </ins> } else { if _, ok := err.(*core.FitError); ok { <del> klog.V(4).Infof("Unable to schedule %v/%v: no fit: %v; waiting", pod.Namespace, pod.Name, err) </del> <ins> klog.V(2).Infof("Unable to schedule %v/%v: no fit: %v; waiting", pod.Namespace, pod.Name, err) </ins> } else if errors.IsNotFound(err) { <ins> klog.V(2).Infof("Unable to schedule %v/%v: possibly due to node not found: %v; waiting", pod.Namespace, pod.Name, err) </ins> if errStatus, ok := err.(errors.APIStatus); ok && errStatus.Status().Details.Kind == "node" { nodeName := errStatus.Status().Details.Name // when node is not found, We do not remove the node right away. Trying again to get

_, err := client.CoreV1().Nodes().Get(nodeName, metav1.GetOptions{}) if err != nil && errors.IsNotFound(err) { node := v1.Node{ObjectMeta: metav1.ObjectMeta{Name: nodeName}} <del> schedulerCache.RemoveNode(&node) </del> <ins> if err := schedulerCache.RemoveNode(&node); err != nil { klog.V(4).Infof("Node %q is not found; failed to remove it from the cache.", node.Name) } </ins> } } } else {

cache.moveNodeInfoToHead(node.Name) } <del> cache.nodeTree.RemoveNode(node) </del> <ins> if err := cache.nodeTree.RemoveNode(node); err != nil { return err } </ins> cache.removeNodeImageStates(node) return nil }

if na, ok := nt.tree[zone]; ok { for _, nodeName := range na.nodes { if nodeName == n.Name { <del> klog.Warningf("node %v already exist in the NodeTree", n.Name) </del> <ins> klog.Warningf("node %q already exist in the NodeTree", n.Name) </ins> return } }

nt.zones = append(nt.zones, zone) nt.tree[zone] = &nodeArray{nodes: []string{n.Name}, lastIndex: 0} } <del> klog.V(5).Infof("Added node %v in group %v to NodeTree", n.Name, zone) </del> <ins> klog.V(2).Infof("Added node %q in group %q to NodeTree", n.Name, zone) </ins> nt.numNodes++ }

if len(na.nodes) == 0 { nt.removeZone(zone) } <del> klog.V(5).Infof("Removed node %v in group %v from NodeTree", n.Name, zone) </del> <ins> klog.V(2).Infof("Removed node %q in group %q from NodeTree", n.Name, zone) </ins> nt.numNodes-- return nil } } } <del> klog.Errorf("Node %v in group %v was not found", n.Name, zone) return fmt.Errorf("node %v in group %v was not found", n.Name, zone) </del> <ins> klog.Errorf("Node %q in group %q was not found", n.Name, zone) return fmt.Errorf("node %q in group %q was not found", n.Name, zone) </ins> } // removeZone removes a zone from tree.

fwk.RunUnreservePlugins(pluginContext, assumedPod, scheduleResult.SuggestedHost) sched.recordSchedulingFailure(assumedPod, err, SchedulerError, fmt.Sprintf("Binding rejected: %v", err)) } else { <del> klog.V(2).Infof("pod %v/%v is bound successfully on node %v, %d nodes evaluated, %d nodes were found feasible", assumedPod.Namespace, assumedPod.Name, scheduleResult.SuggestedHost, scheduleResult.EvaluatedNodes, scheduleResult.FeasibleNodes) </del> <ins> // Calculating nodeResourceString can be heavy. Avoid it if klog verbosity is below 2. if klog.V(2) { node, _ := sched.Cache().GetNodeInfo(scheduleResult.SuggestedHost) klog.Infof("pod %v/%v is bound successfully on node %q, %d nodes evaluated, %d nodes were found feasible. Bound node resource: %q.", assumedPod.Namespace, assumedPod.Name, scheduleResult.SuggestedHost, scheduleResult.EvaluatedNodes, scheduleResult.FeasibleNodes, nodeResourceString(node)) } </ins> metrics.PodScheduleSuccesses.Inc() // Run "postbind" plugins.

} }() } <ins> // nodeResourceString returns a string representation of node resources. func nodeResourceString(n *v1.Node) string { if n == nil { return "N/A" } return fmt.Sprintf("Capacity: %s; Allocatable: %s.", resourceString(&n.Status.Capacity), resourceString(&n.Status.Allocatable)) } func resourceString(r *v1.ResourceList) string { return fmt.Sprintf("CPU<%s>|Memory<%s>|Pods<%s>|StorageEphemeral<%s>", r.Cpu().String(), r.Memory().String(), r.Pods().String(), r.StorageEphemeral().String()) } </ins>