Skip to content

xen/xcpng: set vmr.VCPUsMax to minimum of global setting and host cpu cores - #7887

Merged
DaanHoogland merged 11 commits into
apache:4.18from
weizhouapache:4.18-xcpng-revert-pr4672
Aug 28, 2023
Merged

xen/xcpng: set vmr.VCPUsMax to minimum of global setting and host cpu cores#7887
DaanHoogland merged 11 commits into
apache:4.18from
weizhouapache:4.18-xcpng-revert-pr4672

Conversation

@weizhouapache

Copy link
Copy Markdown
Member

This fixes#7375

Description

This PR...

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

@weizhouapache

Copy link
Copy Markdown
MemberAuthor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@weizhouapache a [SF] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan

Copy link
Copy Markdown

Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 6841

@codecov

codecovBot commented Aug 21, 2023

Copy link
Copy Markdown

Codecov Report

Merging #7887 (d72745f) into 4.18 (3c38ed7) will decrease coverage by 0.01%.
Report is 9 commits behind head on 4.18.
The diff coverage is 0.00%.

@@ Coverage Diff @@## 4.18 #7887 +/- ##
============================================
- Coverage 13.06% 13.06% -0.01% - Complexity 9088 9093 +5 
============================================
Files 2720 2720 Lines 257391 257431 +40 Branches 40130 40141 +11 ============================================
+ Hits 33621 33622 +1 - Misses 219548 219582 +34 - Partials 4222 4227 +5 
Files ChangedCoverage Δ
...stack/engine/orchestration/VolumeOrchestrator.java1.89% <0.00%> (ø)
...visor/vmware/manager/VmwareStorageManagerImpl.java6.20% <0.00%> (-0.03%)⬇️
...oud/hypervisor/vmware/resource/VmwareResource.java4.48% <0.00%> (-0.01%)⬇️
...cloud/storage/resource/VmwareStorageProcessor.java0.32% <0.00%> (-0.01%)⬇️
.../main/java/com/cloud/hypervisor/XenServerGuru.java49.45% <0.00%> (+3.05%)⬆️
...ervisor/xenserver/resource/CitrixResourceBase.java4.51% <0.00%> (ø)
...astore/driver/SolidFirePrimaryDataStoreDriver.java0.00% <0.00%> (ø)
...src/main/java/com/cloud/api/ApiResponseHelper.java4.53% <0.00%> (ø)
.../cloud/configuration/ConfigurationManagerImpl.java15.46% <0.00%> (-0.05%)⬇️
...n/java/com/cloud/network/IpAddressManagerImpl.java3.14% <0.00%> (-0.11%)⬇️
... and 2 more

... and 4 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@weizhouapache

Copy link
Copy Markdown
MemberAuthor

@blueorangutan test rocky8 xcpng-82

@blueorangutan

Copy link
Copy Markdown

@weizhouapache [SF] unsupported parameters provided. Supported mgmt server os are: centos7, centos6, suse15, alma8, ubuntu18, ubuntu22, ubuntu20, rocky8, alma9. Supported hypervisors are: kvm-centos6, kvm-centos7, kvm-rocky8, kvm-alma8, kvm-alma9, kvm-ubuntu18, kvm-ubuntu20, kvm-ubuntu22, kvm-suse15, vmware-55u3, vmware-60u2, vmware-65u2, vmware-67u3, vmware-70u1, vmware-70u2, vmware-70u3, vmware-80, vmware-80u1, xenserver-65sp1, xenserver-71, xenserver-74, xcpng74, xcpng76, xcpng80, xcpng81, xcpng82

@weizhouapache

Copy link
Copy Markdown
MemberAuthor

@blueorangutan test rocky8 xcpng82

@blueorangutan

Copy link
Copy Markdown

@weizhouapache a [SF] Trillian-Jenkins test job (rocky8 mgmt + xcpng82) has been kicked to run smoke tests

@weizhouapache

Copy link
Copy Markdown
MemberAuthor

@blueorangutan test rocky8 xenserver-71

@blueorangutan

Copy link
Copy Markdown

@weizhouapache a [SF] Trillian-Jenkins test job (rocky8 mgmt + xenserver-71) has been kicked to run smoke tests

@blueorangutan

Copy link
Copy Markdown

[SF] Trillian test result (tid-7499)
Environment: xenserver-71 (x2), Advanced Networking with Mgmt server 7
Total time taken: 39997 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr7887-t7499-xenserver-71.zip
Smoke tests completed. 108 look OK, 0 have errors, 0 did not run
Only failed and skipped tests results shown below:

TestResultTime (s)Test File

@weizhouapacheweizhouapache added the status:ready-for-sonar-check This PR is safe for Sonar Quality Check label Aug 22, 2023
@blueorangutan

Copy link
Copy Markdown

[SF] Trillian test result (tid-7490)
Environment: xcpng82 (x2), Advanced Networking with Mgmt server r8
Total time taken: 62077 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr7887-t7490-xcpng82.zip
Smoke tests completed. 103 look OK, 5 have errors, 0 did not run
Only failed and skipped tests results shown below:

TestResultTime (s)Test File
test_01_non_strict_host_anti_affinityError195.62test_nonstrict_affinity_group.py
test_02_non_strict_host_affinityError120.50test_nonstrict_affinity_group.py
test_deploy_vm_with_registered_userdataError809.85test_register_userdata.py
test_deploy_vm_with_registered_userdata_with_override_policy_allowError834.18test_register_userdata.py
test_deploy_vm_with_registered_userdata_with_override_policy_appendError812.00test_register_userdata.py
test_deploy_vm_with_registered_userdata_with_paramsError857.08test_register_userdata.py
test_01_scale_vmError136.66test_scale_vm.py
test_04_scale_vm_with_user_accountError153.96test_scale_vm.py
test_05_scale_vm_dont_allow_disk_offering_changeError34.13test_scale_vm.py
test_list_vms_metrics_adminError0.22test_metrics_api.py
test_list_vms_metrics_historyError0.18test_metrics_api.py
test_list_volumes_metrics_historyError0.17test_metrics_api.py
test_01_deploy_vm_on_specific_hostError0.11test_vm_deployment_planner.py
test_02_deploy_vm_on_specific_clusterError0.09test_vm_deployment_planner.py
test_03_deploy_vm_on_specific_podError0.10test_vm_deployment_planner.py
test_04_deploy_vm_on_host_override_pod_and_clusterError0.15test_vm_deployment_planner.py
test_05_deploy_vm_on_cluster_override_podError0.10test_vm_deployment_planner.py

@weizhouapacheweizhouapache removed the status:ready-for-sonar-check This PR is safe for Sonar Quality Check label Aug 22, 2023
@weizhouapache
weizhouapache changed the base branch from 4.18 to 4.18-enable-sonar-check-by-labelAugust 22, 2023 07:53
@weizhouapache

weizhouapache commented Aug 22, 2023

Copy link
Copy Markdown
MemberAuthor

@blueorangutan test centos7 xcpng-82 keepEnv

@apacheapache deleted a comment from blueorangutanAug 22, 2023
@apacheapache deleted a comment from blueorangutanAug 22, 2023
@apacheapache deleted a comment from blueorangutanAug 22, 2023
@apacheapache deleted a comment from blueorangutanAug 22, 2023
@weizhouapacheweizhouapache added the status:ready-for-sonar-check This PR is safe for Sonar Quality Check label Aug 22, 2023
@weizhouapache
weizhouapache changed the base branch from 4.18-enable-sonar-check-by-label to 4.18August 22, 2023 08:00
@blueorangutan

Copy link
Copy Markdown

@weizhouapache a [SF] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan

Copy link
Copy Markdown

Packaging result [SF]: ✖️ el7 ✔️ debian. SL-JID 6909

…or/xenserver/resource/CitrixResourceBase.java
Co-authored-by: dahn <daan.hoogland@gmail.com>
@weizhouapache

Copy link
Copy Markdown
MemberAuthor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@weizhouapache a [SF] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan

Copy link
Copy Markdown

Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 6911

@blueorangutan

Copy link
Copy Markdown

Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 6913

…or/xenserver/resource/CitrixResourceBase.java
…or/xenserver/resource/CitrixResourceBase.java
@weizhouapache

Copy link
Copy Markdown
MemberAuthor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@weizhouapache a [SF] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@weizhouapacheweizhouapache changed the title xen/xcpng: revert java changes in PR #4672xen/xcpng: set vmr.VCPUsMax to minimum of global setting and host cpu coresAug 28, 2023
@weizhouapacheweizhouapache removed the status:ready-for-sonar-check This PR is safe for Sonar Quality Check label Aug 28, 2023
@weizhouapache
weizhouapache marked this pull request as ready for review August 28, 2023 09:32

@DaanHooglandDaanHoogland left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clgtm

@harikrishna-patnalaharikrishna-patnala left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM

@blueorangutan

Copy link
Copy Markdown

Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 6914

@weizhouapache

Copy link
Copy Markdown
MemberAuthor

@blueorangutan test rocky8 xenserver-71

@blueorangutan

Copy link
Copy Markdown

@weizhouapache a [SF] Trillian-Jenkins test job (rocky8 mgmt + xenserver-71) has been kicked to run smoke tests

@weizhouapache

Copy link
Copy Markdown
MemberAuthor

@DaanHoogland@harikrishna-patnala@shwstppr
I have manually tested ok

  • The env have 2 hosts (3 sockets, 1 cpu per socket)
MariaDB [cloud]> select cpus,cpu_sockets from host where type='Routing';
+------+-------------+
| cpus | cpu_sockets |
+------+-------------+
| 3 | 3 |
| 3 | 3 |
+------+-------------+
2 rows in set (0.00 sec)
  • Updated db manually to simulate hosts with 1 socket and 3 cpus per socket.
MariaDB [cloud]> update host set cpu_sockets = 1 where type='Routing';
Query OK, 2 rows affected (0.01 sec)
Rows matched: 2 Changed: 2 Warnings: 0
MariaDB [cloud]> MariaDB [cloud]> select cpus,cpu_sockets from host where type='Routing';
+------+-------------+
| cpus | cpu_sockets |
+------+-------------+
| 3 | 1 |
| 3 | 1 |
+------+-------------+
2 rows in set (0.00 sec)
  • changed global/zone configuration to enable dynamic scale
    enable.dynamic.scale.vm = true

  • changed template to "Dynamically scalable"
    image

  • created a service offering with 2 cpus and 1GB memory

  • create a vm with the new service offering and template

without this PR, it failed

com.cloud.utils.exception.CloudRuntimeException: Unable to start VM(i-2-21-VM) on host(4282a91e-dc93-4305-a21a-d87ce4fe7e87) due to Task failed! Task record: uuid: 5f732b21-7e74-cf31-2cf4-ddc4f48517bc
nameLabel: Async.VM.start_on
nameDescription:
allowedOperations: []
currentOperations: {}
created: Mon Aug 28 10:39:13 UTC 2023
finished: Mon Aug 28 10:39:13 UTC 2023
status: failure
residentOn: com.xensource.xenapi.Host@b83408c7
progress: 1.0
type: <none/>
result:
errorInfo: [VALUE_NOT_SUPPORTED, VCPUs-at-startup, 2, value greater than VCPUs-max]
otherConfig: {}
subtaskOf: com.xensource.xenapi.Task@aaf13f6f
subtasks: []

with this PR, succeed to create a vm

@weizhouapache

Copy link
Copy Markdown
MemberAuthor

@blueorangutan test rocky8 xenserver-71

@blueorangutan

Copy link
Copy Markdown

@weizhouapache a [SF] Trillian-Jenkins test job (rocky8 mgmt + xenserver-71) has been kicked to run smoke tests

@DaanHoogland

Copy link
Copy Markdown
Contributor

reproduced and validated 👍

@DaanHoogland
DaanHoogland merged commit 439d70f into apache:4.18Aug 28, 2023
@DaanHoogland
DaanHoogland deleted the 4.18-xcpng-revert-pr4672 branch August 28, 2023 12:26
DaanHoogland added a commit that referenced this pull request Aug 28, 2023
* 4.18:
xen/xcpng: set vmr.VCPUsMax to minimum of global setting and host cpu cores (#7887)
@blueorangutan

Copy link
Copy Markdown

[SF] Trillian test result (tid-7590)
Environment: xenserver-71 (x2), Advanced Networking with Mgmt server r8
Total time taken: 40529 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr7887-t7590-xenserver-71.zip
Smoke tests completed. 108 look OK, 0 have errors, 0 did not run
Only failed and skipped tests results shown below:

TestResultTime (s)Test File

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Can't create or scale VM to more then 2 vcpus. XCP-NG.

4 participants

@weizhouapache@blueorangutan@DaanHoogland@harikrishna-patnala