-
Notifications
You must be signed in to change notification settings - Fork 23.7k
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
Fix AIX processor facts and add unit test #78223
Conversation
The test
The test
|
I did some archeology, and it turns out that this code has been here forever, with only minor changes since 2013: 6a89177 introduced in Ansible 1.1. Maybe processors had just one core at the time, which may explain why they confused the total number of threads and the number of threads per core. |
@zorun It is very difficult to get an AIX system for testing, maybe that is the reason this part of the code is untouched. |
@Akasurde this is why I added unit tests from the two AIX machines I have access on https://cfarm.tetaneutral.net/machines/list/ |
Please create a changelog fragment. |
Done! |
- `processor_count` was erroneously set to the number of cores - `processor_cores` was erroneously set to the number of threads per core - `processor_vcpus` and `processor_threads_per_core` were not set - `processor` was a string, while it's supposed to be a list Before: ``` "ansible_processor": "PowerPC_POWER7", "ansible_processor_cores": 4, "ansible_processor_count": 12, ``` After: ``` "ansible_processor": [ "PowerPC_POWER7" ], "ansible_processor_cores": 12, "ansible_processor_count": 1, "ansible_processor_threads_per_core": 4, "ansible_processor_vcpus": 48, ``` Also add a unit test.
SUMMARY
processor_count
was erroneously set to the number of coresprocessor_cores
was erroneously set to the number of threads per coreprocessor_vcpus
andprocessor_threads_per_core
were not setprocessor
was a string, while it's supposed to be a listISSUE TYPE
COMPONENT NAME
facts/hardware/aix
ADDITIONAL INFORMATION
Before:
After: