-
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
CPU total is 0 when threads-per-core is 0 #1755
Labels
Status: Waiting on chef
Waiting on chef folks to respond to questions in the issue.
Type: Bug
Does not work as expected.
Comments
Perhaps this happens when hyper-threading is disabled? https://access.redhat.com/solutions/2772731 UPDATE: No, on my test machine threads per core goes from 2 to 1, not 0. |
stanhu
added a commit
to stanhu/ohai
that referenced
this issue
Jul 5, 2022
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
stanhu
added a commit
to stanhu/ohai
that referenced
this issue
Jul 5, 2022
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]>
10 tasks
10 tasks
stanhu
added a commit
to stanhu/ohai
that referenced
this issue
Aug 30, 2022
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]>
stanhu
added a commit
to stanhu/ohai
that referenced
this issue
Aug 30, 2022
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]>
jaymzh
pushed a commit
that referenced
this issue
Sep 6, 2022
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 #1755 Signed-off-by: Stan Hu <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Status: Waiting on chef
Waiting on chef folks to respond to questions in the issue.
Type: Bug
Does not work as expected.
Description
Since #1454, using
node['cpu']['total']
appears to return 0 for some virtualized platforms whenthreads per core
is 0.This was reported in https://gitlab.com/gitlab-org/omnibus-gitlab/-/issues/6895.
Ohai Version
v17.9.0
Platform Version
Linux x86 and arm64
Ohai Output
Example
lscpu
output:cc @ramereth @jaymzh
The text was updated successfully, but these errors were encountered: