mirror of https://github.com/apache/cloudstack.git
XS host free memory might change, if user manually changes dom0 memory,
this patch makes CS update latest XS host free memory on host connect process.
This commit is contained in:
parent
9c739ef93d
commit
ac649b43e6
|
|
@ -589,9 +589,10 @@ public class CapacityManagerImpl extends ManagerBase implements CapacityManager,
|
|||
|
||||
CapacityVO cpuCap = _capacityDao.findByHostIdType(host.getId(), CapacityVO.CAPACITY_TYPE_CPU);
|
||||
CapacityVO memCap = _capacityDao.findByHostIdType(host.getId(), CapacityVO.CAPACITY_TYPE_MEMORY);
|
||||
memCap.setTotalCapacity(host.getTotalMemory());
|
||||
if (cpuCap != null && memCap != null){
|
||||
|
||||
if ( host.getTotalMemory() != null ) {
|
||||
memCap.setTotalCapacity(host.getTotalMemory());
|
||||
}
|
||||
long hostTotalCpu = host.getCpus().longValue() * host.getSpeed().longValue();
|
||||
|
||||
if (cpuCap.getTotalCapacity() != hostTotalCpu) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue