File tree Expand file tree Collapse file tree
server/src/com/cloud/capacity Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -542,9 +542,9 @@ public void updateCapacityForHost(Host host){
542542 ClusterDetailsVO clusterDetailRam = _clusterDetailsDao .findDetail (cluster .getId (), "memoryOvercommitRatio" );
543543 Float clusterCpuOvercommitRatio = Float .parseFloat (clusterDetailCpu .getValue ());
544544 Float clusterRamOvercommitRatio = Float .parseFloat (clusterDetailRam .getValue ());
545- Float cpuOvercommitRatio = 1f ;
546- Float ramOvercommitRatio = 1f ;
547545 for (VMInstanceVO vm : vms ) {
546+ Float cpuOvercommitRatio = 1f ;
547+ Float ramOvercommitRatio = 1f ;
548548 UserVmDetailVO vmDetailCpu = _userVmDetailsDao .findDetail (vm .getId (), "cpuOvercommitRatio" );
549549 UserVmDetailVO vmDetailRam = _userVmDetailsDao .findDetail (vm .getId (),"memoryOvercommitRatio" );
550550 if (vmDetailCpu != null ) {
@@ -562,6 +562,8 @@ public void updateCapacityForHost(Host host){
562562 s_logger .debug ("Found " + vmsByLastHostId .size () + " VM, not running on host " + host .getId ());
563563 }
564564 for (VMInstanceVO vm : vmsByLastHostId ) {
565+ Float cpuOvercommitRatio = 1f ;
566+ Float ramOvercommitRatio = 1f ;
565567 long secondsSinceLastUpdate = (DateUtil .currentGMTTime ().getTime () - vm .getUpdateTime ().getTime ()) / 1000 ;
566568 if (secondsSinceLastUpdate < _vmCapacityReleaseInterval ) {
567569 UserVmDetailVO vmDetailCpu = _userVmDetailsDao .findDetail (vm .getId (), "cpuOvercommitRatio" );
You can’t perform that action at this time.
0 commit comments