mirror of https://github.com/apache/cloudstack.git
bug 8464,8404: allocator is not move reserved resource to used resource, in some case
status 8464: resolved fixed status 8404: resolved fixed
This commit is contained in:
parent
4fe6219754
commit
169ac1ce57
|
|
@ -193,10 +193,10 @@ public class CapacityManagerImpl implements CapacityManager {
|
|||
if (reservedCpu >= cpu && reservedMem >= ram) {
|
||||
capacityCpu.setReservedCapacity(reservedCpu - cpu);
|
||||
capacityMem.setReservedCapacity(reservedMem - ram);
|
||||
if ((usedCpu + reservedCpu + cpu <= totalCpu) && (reservedMem + usedMem + ram <= totalMem)) {
|
||||
capacityCpu.setUsedCapacity(usedCpu + cpu);
|
||||
capacityMem.setUsedCapacity(usedMem + ram);
|
||||
}
|
||||
|
||||
capacityCpu.setUsedCapacity(usedCpu + cpu);
|
||||
capacityMem.setUsedCapacity(usedMem + ram);
|
||||
|
||||
success = true;
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in New Issue