The db. entry gets created at install time. These are max. supported values specific to HV version and won't be editable through API/UI.
-----Original Message----- From: Hari Kannan Sent: Tuesday, January 22, 2013 1:24 AM To: cloudstack-dev@incubator.apache.org; Koushik Das Subject: RE: Review Request: CLOUDSTACK-672: Set VMware cluster max. limit based on HV version Hi Koushik When you wrote " read the max_hosts_per_cluster limit from hypervisor_capabilities table ", can you please explain how the " max_hosts_per_cluster limit from hypervisor_capabilities table" is set/populated in the first place? Hari -----Original Message----- From: Koushik Das [mailto:nore...@reviews.apache.org] On Behalf Of Koushik Das Sent: Monday, January 21, 2013 3:45 AM To: cloudstack; Koushik Das Subject: Review Request: CLOUDSTACK-672: Set VMware cluster max. limit based on HV version ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/9041/ ----------------------------------------------------------- Review request for cloudstack. Description ------- For Vmware max. hosts in a cluster is specific to HV version. This configuration is read from the hypervisor_capabilities table. Read the dev list discussion here: http://apache.markmail.org/thread/lva7loblbksiavm7 Scenarios: - Adding a cluster to CS - From 1st host in the list of hosts discovered, query the HV version. Based on the version read the max_hosts_per_cluster limit from hypervisor_capabilities table and do the validation - Adding a host to an existing cluster - Get the HV version from one of the hosts already present in cluster from CS db., then similar to previous scenario The implementation is specific to Vmware only, haven't made the validation logic generic as there are no limits for other HVs currently. For upgraded scenarios, HV versions may not be present for the existing host table entries. In that case the 'default' version will get used to read the limit. This addresses bug CLOUDSTACK-672. Diffs ----- api/src/com/cloud/hypervisor/HypervisorCapabilities.java efb8a6a core/src/com/cloud/hypervisor/HypervisorCapabilitiesVO.java 56e8e0a plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/VmwareServerDiscoverer.java 684df54 plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManager.java be3fe9f plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java c450312 server/src/com/cloud/configuration/Config.java 4ae144e server/src/com/cloud/hypervisor/dao/HypervisorCapabilitiesDao.java 8f4a475 server/src/com/cloud/hypervisor/dao/HypervisorCapabilitiesDaoImpl.java 1a6fb72 setup/db/create-schema.sql 174f53c setup/db/db/schema-40to410.sql a9d168d Diff: https://reviews.apache.org/r/9041/diff/ Testing ------- Manually verifed the scenarios mentioned above. Thanks, Koushik Das