-
Notifications
You must be signed in to change notification settings - Fork 23.9k
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
facts: fix SPARC cpu count on linux #30261
Merged
Merged
Conversation
This file contains 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
On sparc64, /proc/cpuinfo has no usual 'model name', 'Processor', 'vendor_id', 'Vendor', as a result "ansible_processor_vcpus" is always 1. Add check element "ncpus active" to fix the issue. Without a patch: $ ansible localhost -m setup -a 'filter=ansible_processor*' [WARNING]: provided hosts list is empty, only localhost is available localhost | SUCCESS => { "ansible_facts": { "ansible_processor": [ "UltraSparc T5 (Niagara5)" ], "ansible_processor_cores": 1, "ansible_processor_count": 1, "ansible_processor_threads_per_core": 1, "ansible_processor_vcpus": 1 }, "changed": false } with the patch: $ ansible localhost -m setup -a 'filter=ansible_processor*' [WARNING]: provided hosts list is empty, only localhost is available localhost | SUCCESS => { "ansible_facts": { "ansible_processor": [ "UltraSparc T5 (Niagara5)" ], "ansible_processor_cores": 1, "ansible_processor_count": 8, "ansible_processor_threads_per_core": 1, "ansible_processor_vcpus": 8 }, "changed": false } $ cat /proc/cpuinfo cpu : UltraSparc T5 (Niagara5) fpu : UltraSparc T5 integrated FPU pmu : niagara5 prom : OBP 4.38.8 2017/02/22 13:51 type : sun4v ncpus probed : 8 ncpus active : 8 D$ parity tl1 : 0 I$ parity tl1 : 0 cpucaps : flush,stbar,swap,muldiv,v9,blkinit,n2,mul32,div32,v8plus,popc,vis,vis2,ASIBlkInit,fmaf,vis3,hpc,ima,pause,cbcond,aes,des,kasumi,camellia,md5,sha1,sha256,sha512,mpmul,montmul,montsqr,crc32c Cpu0ClkTck : 00000000d6924470 Cpu1ClkTck : 00000000d6924470 Cpu2ClkTck : 00000000d6924470 Cpu3ClkTck : 00000000d6924470 Cpu4ClkTck : 00000000d6924470 Cpu5ClkTck : 00000000d6924470 Cpu6ClkTck : 00000000d6924470 Cpu7ClkTck : 00000000d6924470 MMU Type : Hypervisor (sun4v) MMU PGSZs : 8K,64K,4MB,256MB,2GB State: CPU0: online CPU1: online CPU2: online CPU3: online CPU4: online CPU5: online CPU6: online CPU7: online
ansibot
added
affects_2.5
This issue/PR affects Ansible v2.5
bugfix_pull_request
module_utils/facts
needs_triage
Needs a first human triage before being processed.
support:core
This issue/PR relates to code supported by the Ansible Engineering Team.
labels
Sep 13, 2017
jborean93
removed
the
needs_triage
Needs a first human triage before being processed.
label
Sep 14, 2017
ansibot
added
the
stale_ci
This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested.
label
Sep 22, 2017
LGTM, shipit Thanks for the patch and the sample data! |
zorun
pushed a commit
to zorun/ansible
that referenced
this pull request
Sep 23, 2017
On sparc64, /proc/cpuinfo has no usual 'model name', 'Processor', 'vendor_id', 'Vendor', as a result "ansible_processor_vcpus" is always 1. Add check element "ncpus active" to fix the issue. (cherry picked from commit e93ecac)
zorun
pushed a commit
to zorun/ansible
that referenced
this pull request
Sep 23, 2017
On sparc64, /proc/cpuinfo has no usual 'model name', 'Processor', 'vendor_id', 'Vendor', as a result "ansible_processor_vcpus" is always 1. Add check element "ncpus active" to fix the issue. Backport from e93ecac (ansible#30261)
zorun
pushed a commit
to zorun/ansible
that referenced
this pull request
Sep 23, 2017
On sparc64, /proc/cpuinfo has no usual 'model name', 'Processor', 'vendor_id', 'Vendor', as a result "ansible_processor_vcpus" is always 1. Add check element "ncpus active" to fix the issue. Backport from e93ecac (ansible#30261)
This was referenced Sep 23, 2017
prasadkatti
pushed a commit
to prasadkatti/ansible
that referenced
this pull request
Oct 1, 2017
On sparc64, /proc/cpuinfo has no usual 'model name', 'Processor', 'vendor_id', 'Vendor', as a result "ansible_processor_vcpus" is always 1. Add check element "ncpus active" to fix the issue.
BondAnthony
pushed a commit
to BondAnthony/ansible
that referenced
this pull request
Oct 5, 2017
On sparc64, /proc/cpuinfo has no usual 'model name', 'Processor', 'vendor_id', 'Vendor', as a result "ansible_processor_vcpus" is always 1. Add check element "ncpus active" to fix the issue.
This was referenced Jan 31, 2018
ansibot
added
bug
This issue/PR relates to a bug.
and removed
bugfix_pull_request
labels
Mar 6, 2018
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
affects_2.5
This issue/PR affects Ansible v2.5
bug
This issue/PR relates to a bug.
c:module_utils/facts
module_utils/facts
stale_ci
This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested.
support:core
This issue/PR relates to code supported by the Ansible Engineering Team.
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.
On sparc64, /proc/cpuinfo has no usual 'model name', 'Processor', 'vendor_id', 'Vendor',
as a result "ansible_processor_vcpus" is always 1.
Add check element "ncpus active" to fix the issue.
Without a patch:
with the patch:
SUMMARY
ISSUE TYPE
COMPONENT NAME
ANSIBLE VERSION
ADDITIONAL INFORMATION