Fix the bug that determining guaranteed qos won't work well with small numbers

This commit is contained in:
Janet Kuo 2015-09-10 17:20:16 -07:00
parent 2e5aeaff52
commit edc75cd565

View File

@ -35,7 +35,7 @@ func isResourceGuaranteed(container *api.Container, resource api.ResourceName) b
if !hasReq || !hasLimit {
return false
}
return req.Value() == limit.Value() && req.Value() != 0
return req.Cmp(limit) == 0 && req.Value() != 0
}
// isResourceBestEffort returns true if the container's resource requirements are best-effort.