Commit c5516bde authored by Antoine Millet's avatar Antoine Millet
Browse files

Fixed target ratio computing in allocator

parent 865311fb
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -149,7 +149,7 @@ class HaveEnoughCPU(Filter):
                reserved = int(candidate.get('cpureserved', self.DEFAULT_RESERVED_CPU))
            except ValueError:
                reserved = self.DEFAULT_RESERVED_CPU
            ratio = (float(candidate.get('cpualloc')) + cpu) / (float(candidate.get('cpu')) + reserved)
            ratio = (float(candidate.get('cpualloc')) + cpu) / (float(candidate.get('cpu')) - reserved)
            if ratio <= float(candidate.get('cpuallowedratio', self.DEFAULT_ALLOWED_RATIO)):
                yield candidate