Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KVM Agent config to reserve dom0 CPUs #7987

Merged
merged 1 commit into from Oct 6, 2023

Conversation

mlsorensen
Copy link
Contributor

Description

This PR allows an admin to reserve some hypervisor host CPUs for system use. Another way to think of it is limiting the number of CPUs allocatable to VMs. This can be useful if the admin wants to do other things with the hypervisor's CPU, for example reserve some cores for running hyperconverged storage processes.

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?

Unit test provided, tested locally as well by setting host.reserved.cpu.count to various settings, restarting agent, confirming at UI that host's CPU count has changed.

@codecov
Copy link

codecov bot commented Sep 20, 2023

Codecov Report

Merging #7987 (8bbc06c) into main (3c60829) will increase coverage by 0.99%.
The diff coverage is 61.53%.

@@             Coverage Diff              @@
##               main    #7987      +/-   ##
============================================
+ Coverage     28.27%   29.26%   +0.99%     
- Complexity    29328    30489    +1161     
============================================
  Files          5100     5100              
  Lines        358336   358343       +7     
  Branches      52311    52312       +1     
============================================
+ Hits         101305   104859    +3554     
+ Misses       243016   239084    -3932     
- Partials      14015    14400     +385     
Flag Coverage Δ
simulator-marvin-tests 25.23% <0.00%> (+1.24%) ⬆️
uitests 4.87% <ø> (ø)
unit-tests 14.50% <66.66%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
...va/com/cloud/agent/properties/AgentProperties.java 0.00% <0.00%> (ø)
...org/apache/cloudstack/utils/linux/KVMHostInfo.java 58.58% <88.88%> (+2.20%) ⬆️
...ervisor/kvm/resource/LibvirtComputingResource.java 18.68% <0.00%> (-0.01%) ⬇️

... and 253 files with indirect coverage changes

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

Copy link
Member

@GabrielBrascher GabrielBrascher left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@DaanHoogland DaanHoogland left a comment

Choose a reason for hiding this comment

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

looks good (but aggree with @GutoVeronezi 's remark)

@rohityadavcloud rohityadavcloud added this to the 4.19.0.0 milestone Sep 25, 2023
@rohityadavcloud
Copy link
Member

@blueorangutan package

@blueorangutan
Copy link

@rohityadavcloud 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

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

@rohityadavcloud
Copy link
Member

@blueorangutan test

@blueorangutan
Copy link

@rohityadavcloud a [SF] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

@blueorangutan
Copy link

[SF] Trillian test result (tid-7720)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 56336 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr7987-t7720-kvm-centos7.zip
Smoke tests completed. 112 look OK, 1 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_01_invalid_upgrade_kubernetes_cluster Failure 3616.55 test_kubernetes_clusters.py
test_02_upgrade_kubernetes_cluster Failure 3608.40 test_kubernetes_clusters.py
test_03_deploy_and_scale_kubernetes_cluster Failure 0.04 test_kubernetes_clusters.py
test_04_autoscale_kubernetes_cluster Failure 0.04 test_kubernetes_clusters.py
test_05_basic_lifecycle_kubernetes_cluster Failure 0.04 test_kubernetes_clusters.py
test_06_delete_kubernetes_cluster Failure 0.04 test_kubernetes_clusters.py
test_07_deploy_kubernetes_ha_cluster Failure 0.04 test_kubernetes_clusters.py
test_08_upgrade_kubernetes_ha_cluster Failure 0.04 test_kubernetes_clusters.py
test_09_delete_kubernetes_ha_cluster Failure 0.04 test_kubernetes_clusters.py
test_10_vpc_tier_kubernetes_cluster Failure 47.69 test_kubernetes_clusters.py
test_11_test_unmanaged_cluster_lifecycle Error 1.21 test_kubernetes_clusters.py
ContextSuite context=TestKubernetesCluster>:teardown Error 69.73 test_kubernetes_clusters.py

@rohityadavcloud
Copy link
Member

rohityadavcloud commented Sep 27, 2023

It seems the k8s/cks failures not related to this PR, merging based on packaging, smoketests. Looking at intermittent smoketests failures in github actions, closing-reopening to rekick them.

@github-actions
Copy link

This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.

2 similar comments
@github-actions
Copy link

This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.

@github-actions
Copy link

This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.

@rohityadavcloud
Copy link
Member

@mlsorensen can you help resolve the conflict?

@mlsorensen
Copy link
Contributor Author

Rebased for LibvirtComputingResource style changes.

@rohityadavcloud
Copy link
Member

@blueorangutan package

@blueorangutan
Copy link

@rohityadavcloud 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

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

@DaanHoogland
Copy link
Contributor

@blueorangutan test

@blueorangutan
Copy link

@DaanHoogland a [SF] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

@rohityadavcloud
Copy link
Member

@blueorangutan test

@blueorangutan
Copy link

@rohityadavcloud a [SF] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

@blueorangutan
Copy link

[SF] Trillian test result (tid-7768)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 53230 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr7987-t7768-kvm-centos7.zip
Smoke tests completed. 111 look OK, 2 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_01_invalid_upgrade_kubernetes_cluster Failure 3619.93 test_kubernetes_clusters.py
test_02_upgrade_kubernetes_cluster Failure 3621.11 test_kubernetes_clusters.py
test_03_deploy_and_scale_kubernetes_cluster Failure 0.04 test_kubernetes_clusters.py
test_04_autoscale_kubernetes_cluster Failure 0.04 test_kubernetes_clusters.py
test_05_basic_lifecycle_kubernetes_cluster Failure 0.03 test_kubernetes_clusters.py
test_06_delete_kubernetes_cluster Failure 0.04 test_kubernetes_clusters.py
test_07_deploy_kubernetes_ha_cluster Failure 0.04 test_kubernetes_clusters.py
test_08_upgrade_kubernetes_ha_cluster Failure 0.04 test_kubernetes_clusters.py
test_09_delete_kubernetes_ha_cluster Failure 0.04 test_kubernetes_clusters.py
test_10_vpc_tier_kubernetes_cluster Failure 48.79 test_kubernetes_clusters.py
test_11_test_unmanaged_cluster_lifecycle Error 1.23 test_kubernetes_clusters.py
ContextSuite context=TestKubernetesCluster>:teardown Error 54.42 test_kubernetes_clusters.py
test_05_vmschedule_test_e2e Failure 291.01 test_vm_schedule.py

@DaanHoogland
Copy link
Contributor

@blueorangutan test rocky8 kvm-rocky8

@blueorangutan
Copy link

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

@blueorangutan
Copy link

[SF] Trillian test result (tid-7793)
Environment: kvm-rocky8 (x2), Advanced Networking with Mgmt server r8
Total time taken: 57548 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr7987-t7793-kvm-rocky8.zip
Smoke tests completed. 110 look OK, 3 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_01_invalid_upgrade_kubernetes_cluster Failure 3604.51 test_kubernetes_clusters.py
test_02_upgrade_kubernetes_cluster Failure 3620.52 test_kubernetes_clusters.py
test_03_deploy_and_scale_kubernetes_cluster Failure 0.06 test_kubernetes_clusters.py
test_04_autoscale_kubernetes_cluster Failure 0.05 test_kubernetes_clusters.py
test_05_basic_lifecycle_kubernetes_cluster Failure 0.06 test_kubernetes_clusters.py
test_06_delete_kubernetes_cluster Failure 0.05 test_kubernetes_clusters.py
test_07_deploy_kubernetes_ha_cluster Failure 0.05 test_kubernetes_clusters.py
test_08_upgrade_kubernetes_ha_cluster Failure 0.05 test_kubernetes_clusters.py
test_09_delete_kubernetes_ha_cluster Failure 0.06 test_kubernetes_clusters.py
test_10_vpc_tier_kubernetes_cluster Failure 50.29 test_kubernetes_clusters.py
test_11_test_unmanaged_cluster_lifecycle Error 0.28 test_kubernetes_clusters.py
ContextSuite context=TestKubernetesCluster>:teardown Error 55.08 test_kubernetes_clusters.py
test_05_vmschedule_test_e2e Failure 331.51 test_vm_schedule.py
test_disable_oobm_ha_state_ineligible Error 1516.07 test_hostha_kvm.py

@rohityadavcloud
Copy link
Member

@blueorangutan test rocky8 kvm-rocky8

@blueorangutan
Copy link

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

@blueorangutan
Copy link

[SF] Trillian test result (tid-7833)
Environment: kvm-rocky8 (x2), Advanced Networking with Mgmt server r8
Total time taken: 46463 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr7987-t7833-kvm-rocky8.zip
Smoke tests completed. 112 look OK, 1 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_02_upgrade_kubernetes_cluster Failure 587.61 test_kubernetes_clusters.py

Copy link
Contributor

@GutoVeronezi GutoVeronezi left a comment

Choose a reason for hiding this comment

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

CLGTM

@shwstppr shwstppr merged commit 82b9818 into apache:main Oct 6, 2023
25 of 26 checks passed
Sign up for free to 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.

None yet

7 participants