Fix occasional process rebalance if node resources are not reliable

This commit is contained in:
Ingo Oppermann 2023-09-04 12:16:02 +02:00
parent 157b35b396
commit ce362e76bb
No known key found for this signature in database
GPG Key ID: 2AB32426E9DD229E

View File

@ -1229,6 +1229,11 @@ func rebalance(have []proxy.Process, nodes map[string]proxy.NodeAbout) ([]interf
for id, node := range nodes {
r := node.Resources
// Ignore this node if the resource values are not reliable
if r.Error != nil {
continue
}
// Check if node is overloaded
if r.CPU < r.CPULimit && r.Mem < r.MemLimit && !r.IsThrottling {
continue