@@ -46,7 +46,7 @@ func (d *CacheDumper) dumpNodes() {
46
46
snapshot := d .cache .Snapshot ()
47
47
klog .Info ("Dump of cached NodeInfo" )
48
48
for _ , nodeInfo := range snapshot .Nodes {
49
- klog .Info (printNodeInfo (nodeInfo ))
49
+ klog .Info (d . printNodeInfo (nodeInfo ))
50
50
}
51
51
}
52
52
@@ -61,14 +61,22 @@ func (d *CacheDumper) dumpSchedulingQueue() {
61
61
}
62
62
63
63
// printNodeInfo writes parts of NodeInfo to a string.
64
- func printNodeInfo (n * schedulernodeinfo.NodeInfo ) string {
64
+ func ( d * CacheDumper ) printNodeInfo (n * schedulernodeinfo.NodeInfo ) string {
65
65
var nodeData strings.Builder
66
- nodeData .WriteString (fmt .Sprintf ("\n Node name: %+v\n Requested Resources: %+v\n Allocatable Resources:%+v\n Number of Pods: %v\n Pods :\n " ,
66
+ nodeData .WriteString (fmt .Sprintf ("\n Node name: %+v\n Requested Resources: %+v\n Allocatable Resources:%+v\n Scheduled Pods(number : %v) :\n " ,
67
67
n .Node ().Name , n .RequestedResource (), n .AllocatableResource (), len (n .Pods ())))
68
68
// Dumping Pod Info
69
69
for _ , p := range n .Pods () {
70
70
nodeData .WriteString (printPod (p ))
71
71
}
72
+ // Dumping nominated pods info on the node
73
+ nominatedPods := d .podQueue .NominatedPodsForNode (n .Node ().Name )
74
+ if len (nominatedPods ) != 0 {
75
+ nodeData .WriteString (fmt .Sprintf ("Nominated Pods(number: %v):\n " , len (nominatedPods )))
76
+ for _ , p := range nominatedPods {
77
+ nodeData .WriteString (printPod (p ))
78
+ }
79
+ }
72
80
return nodeData .String ()
73
81
}
74
82
0 commit comments