-
Notifications
You must be signed in to change notification settings - Fork 1.2k
kvm: FIX cpucorespersocket is not working on KVM #4497
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: FIX cpucorespersocket is not working on KVM #4497
Conversation
|
@blueorangutan package |
|
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔centos7 ✖centos8 ✔debian. JID-2435 |
| if (numCoresPerSocket <= 0) { | ||
| if (vcpus % 6 == 0) { | ||
| numCoresPerSocket = 6; | ||
| } else if (vcpus % 4 == 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when vcpus are 8, it is considered as 4 cores per socket here, instead 8 cores.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sureshanaparti this is the current behavior.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sureshanaparti this is the current behavior.
agree, any plan to address here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sureshanaparti you mean change the current behavior ? No. I am not going to change it
It worked since cloudstack 4.13 in commit 2f53295
https://issues.apache.org/jira/browse/CLOUDSTACK-5521
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sureshanaparti you mean change the current behavior ? No. I am not going to change it
It worked since cloudstack 4.13 in commit 2f53295
https://issues.apache.org/jira/browse/CLOUDSTACK-5521
ok @weizhouapache so no change in the behavior. thanks.
|
@blueorangutan test |
|
@rhtyd a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Trillian test result (tid-3275)
|
| return false; | ||
| } | ||
|
|
||
| private void setCpuTopology(CpuModeDef cmd, int vcpus, Map<String, String> details) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ustcweizhou possible to pass coresPerSocket here, instead complete VM details here ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sureshanaparti
I was thinking about it. at the end I decided to pass vm details based on two reasons
(1) setCpuTopology is a complete function now. if pass coresPerSocket , we need to get coresPerSocket out of the method.
(2) it is better if add more cpu settings , for example the pr #4178
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sureshanaparti
I was thinking about it. at the end I decided to pass vm details based on two reasons
(1) setCpuTopology is a complete function now. if pass coresPerSocket , we need to get coresPerSocket out of the method.
(2) it is better if add more cpu settings , for example the pr #4178
Ok @weizhouapache so going forward, cpu hyperthreading detail mentioned in PR #4178 will be added to this method, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sureshanaparti yes. but I need to discuss with @div8cn about some details. it will be an improvement in 4.16
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sureshanaparti yes. but I need to discuss with @div8cn about some details. it will be an improvement in 4.16
OK, Pls update details here. As this PR is targeted for 4.14.1.0, the proposed changes with cpu hyperthreading detail will be targeted for 4.16, Right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sureshanaparti yes, this is a bug which should be fixed in 4.14 and 4.15.
the other pr is an improvement. it will not impact this pr.
|
i have an offering with 3 cores 256 MHz and get a vm with default was QED |
@DaanHoogland wait,it might be a bug............ |
|
@weizhouapache can you investigate and send a PR fix asap, or revert? |
@rhtyd I will create a pr soon. |
…4527) This PR fixes a regression issue in #4497 In cloudstack 4.14 or before, the cpu topology is set only when cpucore per socket is set (to 4 or 6). in other conditions, there is no cpu topology in vm xml definition. with #4497, vm will have cpu topology in its xml definition, if cpucore per socket is not set. <topology sockets='<vm cpu cores>' cores='1' threads='1'/> Not sure if it causes any issue. I think it would be better not to add this part in vm xml definition if cpucore per socket is not set.
* master: server: add conditions for custom offerings (apache#4540) vr: Ensuring dnsmasq.leases file is populated (apache#4529) template: Ensuring template is cross zone if type changed to system (apache#4522) storage: Fix hypervisor type cast to string (apache#4516) db upgrade: fix sql exception: Access denied; you need (at least one of) the SUPER privilege(s) for this operation (apache#4533) CLOUDSTACK-10423:Potential sensitive information disclosure (apache#4536) jobs: The patch remove the password from resultObject and make it be humanreadable (apache#4538) listphysicalnetworks: Honouring keyword parameter (apache#4511) Fix NPE when Volume exists on secondary store but doesn't have a download URL (apache#4530) apidoc issue (apache#4532) db: Fix description of volume.stats.interval which is in milliseconds not seconds (apache#4526) kvm: set cpu topology only if cpucore per socket is positive value (apache#4527) xenserver: check and eject patch vbd for systemvms (apache#4525) Fix warning when setup cloudstack-common (apache#4523) kvm: FIX cpucorespersocket is not working on KVM (apache#4497) change debug to warn for unknown exceptions (apache#4521) Fix failure in validating IP address in case of multiple Management Servers (apache#4507) Update log output for FirstFitPlanner (apache#4515) ui: deprecate old UI and move to legacy to be served at /client/legacy (apache#4518)
Description
This PR fixes the issue that cpu.corespersocket in vm details is not working on kvm.
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?