Achilleas Tzenetopoulos пре 5 година
родитељ
комит
97dc3e7bee

+ 4 - 0
kubernetes-v1.15.4/pkg/scheduler/algorithm/priorities/node_selection.go

@@ -159,6 +159,7 @@ func calculateWeightedAverageCores(response *client.Response,
 	metrics := make(map[string]float64, numberOfMetrics)
 	rows := response.Results[0].Series[0]
 	for i := 1; i < len(rows.Columns); i++ {
+		klog.Infof("Name of column %v : %v", i, rows.Columns[i])
 		for j := 0; j < numberOfRows; j++ {
 			avg := 0.0
 			for k := 0; k < numberOfCores; k++ {
@@ -218,6 +219,7 @@ func queryInfluxDbCores(metrics []string, uuid string, socket,
 	// build the coommand
 	var command strings.Builder
 	fmt.Fprintf(&command, "SELECT %s from core_metrics where uuid = '%s' and socket_id='%d' and %s order by time desc limit %d", columns, uuid, socket, coresPart.String(), numberOfRows)
+	klog.Infof("The query is: %v", command.String())
 	q := client.NewQuery(command.String(), cfg.Database.Name, "")
 	response, err := c.Query(q)
 	if err != nil {
@@ -258,6 +260,8 @@ func nodeSelectionScorer(nodeName string) (float64, error) {
 	if len(cores) == 0 {
 		return 0.0, nil
 	}
+
+	klog.Infof("Node %v has %v cores", nodeName, len(cores))
 	if ok {
 
 		// Select Socket