-
Notifications
You must be signed in to change notification settings - Fork 449
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
Use a minimum of 1 thread per core for CPU total calculation #1756
Conversation
Kudos, SonarCloud Quality Gate passed!
|
LGTM |
Please update the description to show why the default cpu is configurable. |
@johnmccrae Could you elaborate? I don't quite understand. |
#1761 might be an alternative solution: if we get 0, give up and use |
@stanhu - Your change to do |
Ping @stanhu ? |
@jaymzh Oh, right, thanks. It's been a while since I worked on this so I forgot that I did that. Updated. 😄 |
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.
Thanks. Looks good, minus the lint failures. Can you run the rubocop autocorrecting rake task? @tpowell-progress is trying to find the exact command.
ed15b13
to
be90250
Compare
In some LXD containers running with VT-x hardware virtualization, it appears that threads per core is 0, resulting in a total number of CPUs of 0. Add a test case and handle some quirks with the `lscpu` output. Closes chef#1755 Signed-off-by: Stan Hu <[email protected]>
be90250
to
dcffbdb
Compare
Kudos, SonarCloud Quality Gate passed!
|
I manually corrected them. Running |
Thanks! |
Description
In some LXD containers running with VT-x hardware virtualization, it appears that threads per core is 0, resulting in a total number of CPUs of 0. Add a test case and handle some quirks with the
lscpu
output.This pull request also makes the default CPU configurable in the tests. Normally CPU 0 is the default, but on some virtualized hosts this is not the case.
Related Issue
Closes #1755
Types of changes
Checklist: