Bläddra i källkod

added socket insight

Achilleas Tzenetopoulos 5 år sedan
förälder
incheckning
ed6630183e

+ 5 - 3
kubernetes-v1.15.4/pkg/scheduler/algorithm/priorities/custom_resource_allocation.go

@@ -115,6 +115,7 @@ func calculateScore(results map[string]float64,
 	logicFn func(map[string]float64) float64) int64 {
 
 	res := logicFn(results)
+	klog.Infof("Has score (in float) %v\n", res)
 
 	// TODO
 	// While the final score should be an integer,
@@ -209,6 +210,7 @@ func customResourceScorer(nodeName string) (int64, error) {
 		return res, nil
 	} else {
 		klog.Infof("Error finding the uuid: %v", ok)
+		return 0, nil
 	}
 
 	// //Close the database connection in the end of the execution
@@ -238,9 +240,9 @@ func customResourceScorer(nodeName string) (int64, error) {
 	// 	}
 	// }
 
-	res := customRequestedScore(nodeName)
-	klog.Infof("Node name %s, has score %d\n", nodeName, res)
-	return res, nil
+	// res := customRequestedScore(nodeName)
+	// klog.Infof("Node name %s, has score %d\n", nodeName, res)
+	// return res, nil
 }
 
 func customRequestedScore(nodeName string) int64 {