Achilleas Tzenetopoulos 5 years ago
parent
commit
28d05ee9d0

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

@@ -217,7 +217,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)
+	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*len(cores))
 	//klog.Infof("The query is: %v", command.String())
 	q := client.NewQuery(command.String(), cfg.Database.Name, "")
 	response, err := c.Query(q)