Use cpu_info instead of vcpus to get the number of vcpus#466
Merged
Sharpz7 merged 2 commits intoopenstack-exporter:mainfrom Sep 6, 2025
Merged
Use cpu_info instead of vcpus to get the number of vcpus#466Sharpz7 merged 2 commits intoopenstack-exporter:mainfrom
Sharpz7 merged 2 commits intoopenstack-exporter:mainfrom
Conversation
Contributor
Author
|
Hi folks, can any of you take a look at this patch? |
niedbalski
previously approved these changes
Jul 15, 2025
Contributor
Author
|
Hi, I changed the patch for a signed one as that is required for this project. |
Contributor
Author
|
Hi @niedbalski Could you please review this commit again as I re-commited it with a signature? |
Sharpz7
previously approved these changes
Sep 2, 2025
Collaborator
|
@drencrom hmm. There still seems to be an unverified commit. Let me know if you need a hand :) |
The total number of VCPUs should be obtained from CPUInfo instead of the VCPUs column of hypervisor list. This value changes if there are pinned, dedicated or shared CPUs configured in nova. The CPUInfo data may be empty in some openstack versions, so fallback to old method in that case. Signed-off-by: Jorge Merlino <jorge.merlino@canonical.com>
309e44b to
3800483
Compare
Contributor
Author
|
Hi @Sharpz7 Please check if it ok now. |
Member
|
I am +1 to merge this one. |
Sharpz7
approved these changes
Sep 3, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The total number of VCPUs should be obtained from cpu_info instead of the vcpus field. This vcpus value changes if there are pinned, dedicated or shared CPUs configured in nova and, crucially, can be less than vcpus_used.
The cpu_info data may be empty in some openstack versions, so fallback to old method in that case.