nagaboinaramgopal commented on code in PR #14043:
URL: https://github.com/apache/cloudstack/pull/14043#discussion_r4211249438
##########
api/src/main/java/org/apache/cloudstack/cluster/ClusterDrsAlgorithm.java:
##########
@@ -272,6 +299,10 @@ static Double getClusterImbalance(Long clusterId,
List<Ternary<Long, Long, Long>
case "memory":
list = getMetricList(clusterId, memoryList, skipThreshold);
break;
+ case "both":
Review Comment:
`max` is correct for balanced but backwards for condensed, where a higher
imbalance means more packed, so it would count the cluster as packed as soon as
one of cpu or memory was packed while the other was still spread.
I moved the "both" aggregation behind an overridable `combineBothMetrics`,
`max` by default and `min` for condensed, and routed the pre and post migration
imbalance and the service pre-imbalance through it so both ends of the
improvement calculation use the same reduction. Added unit tests for both
algorithms. Pushed in 141e94f5fa.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]