mirror of https://github.com/apache/cloudstack.git
Enable CPU cap for SSVMs and CPVMs (#6420)
* Enable CPU cap for SSVMs and CPVMs * Resolve conflicts Co-authored-by: Joao <JoaoJandre@gitlab.com>
This commit is contained in:
parent
6ac14fad1b
commit
8448fe27a6
|
|
@ -17,4 +17,9 @@
|
|||
|
||||
--;
|
||||
-- Schema upgrade from 4.17.1.0 to 4.18.0.0
|
||||
--;
|
||||
--;
|
||||
|
||||
-- Enable CPU cap for default system offerings;
|
||||
UPDATE `cloud`.`service_offering` so
|
||||
SET so.limit_cpu_use = 1
|
||||
WHERE so.default_use = 1 AND so.vm_type IN ('domainrouter', 'secondarystoragevm', 'consoleproxy', 'internalloadbalancervm', 'elasticloadbalancervm');
|
||||
|
|
@ -695,6 +695,7 @@ public class ConsoleProxyManagerImpl extends ManagerBase implements ConsoleProxy
|
|||
new ConsoleProxyVO(id, serviceOffering.getId(), name, template.getId(), template.getHypervisorType(), template.getGuestOSId(), dataCenterId,
|
||||
systemAcct.getDomainId(), systemAcct.getId(), accountManager.getSystemUser().getId(), 0, serviceOffering.isOfferHA());
|
||||
proxy.setDynamicallyScalable(template.isDynamicallyScalable());
|
||||
proxy.setLimitCpuUse(serviceOffering.getLimitCpuUse());
|
||||
proxy = consoleProxyDao.persist(proxy);
|
||||
try {
|
||||
virtualMachineManager.allocate(name, template, serviceOffering, networks, plan, null);
|
||||
|
|
|
|||
|
|
@ -631,6 +631,7 @@ public class SecondaryStorageManagerImpl extends ManagerBase implements Secondar
|
|||
new SecondaryStorageVmVO(id, serviceOffering.getId(), name, template.getId(), template.getHypervisorType(), template.getGuestOSId(), dataCenterId,
|
||||
systemAcct.getDomainId(), systemAcct.getId(), _accountMgr.getSystemUser().getId(), role, serviceOffering.isOfferHA());
|
||||
secStorageVm.setDynamicallyScalable(template.isDynamicallyScalable());
|
||||
secStorageVm.setLimitCpuUse(serviceOffering.getLimitCpuUse());
|
||||
secStorageVm = _secStorageVmDao.persist(secStorageVm);
|
||||
try {
|
||||
_itMgr.allocate(name, template, serviceOffering, networks, plan, null);
|
||||
|
|
|
|||
Loading…
Reference in New Issue