This is an automated email from the ASF dual-hosted git repository.

rohit pushed a commit to branch 4.18
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/4.18 by this push:
     new 4f85c5568fc engine/schema: fix CPU cap limitation for upgraded 
environment (#7808)
4f85c5568fc is described below

commit 4f85c5568fc2d4b5c9f101f2f35c4cf8a60c876a
Author: Rohit Yadav <[email protected]>
AuthorDate: Mon Aug 7 10:19:33 2023 +0530

    engine/schema: fix CPU cap limitation for upgraded environment (#7808)
    
    CPU cap limitation was enabled as part of
    https://github.com/apache/cloudstack/pull/6420 that changes behaviour
    for existing environments. The CPU cap limitation on KVM causes
    systemvms to not start or be really slow in nested and virtualised
    environments.
    
    Signed-off-by: Rohit Yadav <[email protected]>
---
 engine/schema/src/main/resources/META-INF/db/schema-41800to41810.sql | 5 +++++
 1 file changed, 5 insertions(+)

diff --git 
a/engine/schema/src/main/resources/META-INF/db/schema-41800to41810.sql 
b/engine/schema/src/main/resources/META-INF/db/schema-41800to41810.sql
index 4f27d0408d7..07ac5c8f166 100644
--- a/engine/schema/src/main/resources/META-INF/db/schema-41800to41810.sql
+++ b/engine/schema/src/main/resources/META-INF/db/schema-41800to41810.sql
@@ -31,3 +31,8 @@ CALL ADD_GUEST_OS_AND_HYPERVISOR_MAPPING (6, 'Windows Server 
2022 (64-bit)', 'VM
 CALL ADD_GUEST_OS_AND_HYPERVISOR_MAPPING (6, 'Windows Server 2022 (64-bit)', 
'VMware', '8.0', 'windows2019srvNext_64Guest');
 CALL ADD_GUEST_OS_AND_HYPERVISOR_MAPPING (6, 'Windows Server 2022 (64-bit)', 
'VMware', '8.0.0.1', 'windows2019srvNext_64Guest');
 CALL ADD_GUEST_OS_AND_HYPERVISOR_MAPPING (6, 'Windows Server 2022 (64-bit)', 
'Xenserver', '8.2.0', 'Windows Server 2022 (64-bit)');
+
+-- Don't enable CPU cap for default system offerings, fixes regression from 
https://github.com/apache/cloudstack/pull/6420
+UPDATE `cloud`.`service_offering` so
+SET so.limit_cpu_use = 0
+WHERE so.default_use = 1 AND so.vm_type IN ('domainrouter', 
'secondarystoragevm', 'consoleproxy', 'internalloadbalancervm', 
'elasticloadbalancervm');

Reply via email to