Skip to content

Conversation

@guillemtp
Copy link

Description

On KVM hosts, when agent checks the CPU speed it starts from lscpu before other mechanisms. It does a first check obtaining the CPU frequency from Model Name and if it's not specified in model name it takes from dynamic MHz option.

Dynamic MHz and frequency specified in model name can be different. Normally, dynamic MHz is bigger if the model name specifies. This means that we can have a registered host in CloudStack with a smaller frequency that it can achieve.

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)
  • Build/CI
  • Test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

The following host has been registered with a frequency of 2.4Ghz, which can achieve 3.4GHz. Here the commands that executes the KVMHostInfo.java:

imatge

How Has This Been Tested?

Overriding the lscpu command as the following and restarting the cloudstack agent shows the hosts in CloudStack control plane with the right frequency:

sudo mv /usr/bin/lscpu /usr/bin/lscpu.real
sudo tee /usr/bin/lscpu >/dev/null << 'EOF'
#!/bin/bash
# Wrapper per lscpu: elimina la freqüència del Model name
/usr/bin/lscpu.real "$@" | sed -E 's/(Model name:\s+.*)@ [0-9.]+[GM]Hz/\1/'
EOF

sudo chmod +x /usr/bin/lscpu

@boring-cyborg
Copy link

boring-cyborg bot commented Dec 4, 2025

Congratulations on your first Pull Request and welcome to the Apache CloudStack community! If you have any issues or are unsure about any anything please check our Contribution Guide (https://github.com/apache/cloudstack/blob/main/CONTRIBUTING.md)
Here are some useful points:

@DaanHoogland
Copy link
Contributor

@blueorangutan package

@blueorangutan
Copy link

@DaanHoogland a [SL] 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.

@codecov
Copy link

codecov bot commented Dec 8, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 3.58%. Comparing base (2600965) to head (f567935).
⚠️ Report is 4 commits behind head on main.

❗ There is a different number of reports uploaded between BASE (2600965) and HEAD (f567935). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (2600965) HEAD (f567935)
unittests 1 0
Additional details and impacted files
@@              Coverage Diff              @@
##               main   #12190       +/-   ##
=============================================
- Coverage     17.57%    3.58%   -13.99%     
=============================================
  Files          5913      445     -5468     
  Lines        529427    37538   -491889     
  Branches      64677     6905    -57772     
=============================================
- Hits          93024     1347    -91677     
+ Misses       425940    36025   -389915     
+ Partials      10463      166    -10297     
Flag Coverage Δ
uitests 3.58% <ø> (ø)
unittests ?

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@blueorangutan
Copy link

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✖️ debian ✔️ suse15. SL-JID 15943

@DaanHoogland
Copy link
Contributor

Debian build failed, retrying that.

@DaanHoogland
Copy link
Contributor

@blueorangutan test

@blueorangutan
Copy link

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

@blueorangutan
Copy link

[SF] Trillian test result (tid-14916)
Environment: kvm-ol8 (x2), zone: Advanced Networking with Mgmt server ol8
Total time taken: 60202 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr12190-t14916-kvm-ol8.zip
Smoke tests completed. 142 look OK, 8 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
ContextSuite context=TestAccounts>:setup Error 0.00 test_accounts.py
ContextSuite context=TestAddVmToSubDomain>:setup Error 0.00 test_accounts.py
test_DeleteDomain Error 10.11 test_accounts.py
test_forceDeleteDomain Failure 10.00 test_accounts.py
ContextSuite context=TestRemoveUserFromAccount>:setup Error 10.89 test_accounts.py
ContextSuite context=TestTemplateHierarchy>:setup Error 12.38 test_accounts.py
ContextSuite context=TestDeployVmWithAffinityGroup>:setup Error 0.00 test_affinity_groups_projects.py
ContextSuite context=TestAnnotations>:setup Error 0.00 test_annotations.py
test_query_async_job_result Error 0.00 test_async_job.py
test_01_host_tags Error 60.57 test_host_tags.py
test_01_migrate_VM_and_root_volume Error 76.29 test_vm_life_cycle.py
test_02_migrate_VM_with_two_data_disks Error 23.59 test_vm_life_cycle.py
test_03_secured_to_nonsecured_vm_migration Error 373.88 test_vm_life_cycle.py
test_04_nonsecured_to_secured_vm_migration Error 0.01 test_vm_life_cycle.py
test_01_redundant_vpc_site2site_vpn Failure 425.49 test_vpc_vpn.py
test_hostha_enable_ha_when_host_disabled Error 3.68 test_hostha_kvm.py
test_hostha_enable_ha_when_host_in_maintenance Error 304.81 test_hostha_kvm.py

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.

3 participants