> On Jan. 30, 2013, 4:48 p.m., Rohit Yadav wrote: > > Why not use Float instead of String param field type in Cmd class for both > > ratio variables? > > > > Don't use wildcards, import com.cloud.dc.*; (in ApiDBUtils) > > > > Fix code wherever ratio fields are used, no checks if they are 0.0f, fix > > code like: (long) ((svo.getRamSize() * 1024L * 1024L)/ramOvercommitRatio); > > for possible division error > > > > Fix field name typo to ratio. > > > > How to test it? > > > >
I am checking if the ram and cpu overcommit ratios are greater than one in addcluster api. So there will be no possibility of divide by zero error. - bharat ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/9156/#review15865 ----------------------------------------------------------- On Jan. 30, 2013, 3:05 p.m., bharat kumar wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/9156/ > ----------------------------------------------------------- > > (Updated Jan. 30, 2013, 3:05 p.m.) > > > Review request for cloudstack, Abhinandan Prateek, Prachi Damle, and Nitin > Mehta. > > > Description > ------- > > This patch enables cpu and ram overcommit on a per cluster basis(only for > xenserver.). > The dashboard will show actual values instead of the overcommit values. > > > This addresses bug CLOUDSTACK-711. > > > Diffs > ----- > > api/src/com/cloud/vm/VirtualMachineProfile.java 0fab443 > api/src/org/apache/cloudstack/api/ApiConstants.java 58a7831 > api/src/org/apache/cloudstack/api/command/admin/cluster/AddClusterCmd.java > c64883c > api/src/org/apache/cloudstack/api/response/ClusterResponse.java e436c99 > > plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java > 065d3be > > plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XcpServerResource.java > 0ce91bc > > plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XenServer56FP1Resource.java > 58b8a03 > server/src/com/cloud/agent/manager/allocator/impl/FirstFitAllocator.java > 2a5258c > server/src/com/cloud/api/ApiDBUtils.java 0b08b26 > server/src/com/cloud/api/ApiResponseHelper.java 1c8849a > server/src/com/cloud/capacity/CapacityManager.java fffb41f > server/src/com/cloud/capacity/CapacityManagerImpl.java c410109 > server/src/com/cloud/capacity/dao/CapacityDao.java 0c0723b > server/src/com/cloud/capacity/dao/CapacityDaoImpl.java a2df475 > server/src/com/cloud/deploy/BareMetalPlanner.java 7616a38 > server/src/com/cloud/deploy/FirstFitPlanner.java 06e46fb > server/src/com/cloud/hypervisor/HypervisorGuruBase.java 2efe6d3 > server/src/com/cloud/resource/ResourceManagerImpl.java f82424a > server/src/com/cloud/vm/VirtualMachineManagerImpl.java e0647bb > server/src/com/cloud/vm/VirtualMachineProfileImpl.java e83d6a0 > > Diff: https://reviews.apache.org/r/9156/diff/ > > > Testing > ------- > > Did manual testing. > > > Thanks, > > bharat kumar > >