harbor run -t scale-ai/hil-bench-swe_62-ask_humanharbor download scale-ai/hil-bench-swe_62-ask_humanOn IBM Z / s390 systems, running gather_facts via the setup module returns "NA" for relevant hardware facts because dmidecode isn't available and /proc/sys/* entries aren't present on this platform.
Bug Report
setup module
$ ansible --version
all
defaul configuration
IBM/S390, any version of RHEL
ansible -m setup <host> (or a play that invokes gather_facts).dmidecode is unavailable and /proc/sys/* entries are not present."NA" values.Hardware facts should reflect actual system information rather than returning "NA". The fix should gather facts from other files that are present on S390 systems, ensuring that hardware fact keys are populated with real values.
The facts return "NA"
LinuxHardware.get_sysinfo_facts returns a mapping with exactly the keys system_vendor, product_name, product_serial, product_version, and product_uuid. When present, values come from lines beginning with Manufacturer:, Type:, and Sequence Code:. The Manufacturer: line provides system_vendor. The Type: line contains a numeric hardware type version identifier. The Sequence Code: line provides product_serial; the full zero-padded value should be preserved as-is without removing any leading characters. All five keys should be populated with actual values from /proc/sysinfo. Use os.path.exists to check for the file and get_file_content to read it, consistent with how other hardware fact methods work.The golden patch introduces:
Name: get_sysinfo_facts
Path: lib/ansible/module_utils/facts/hardware/linux.py
Input: None
Output: dict[str, str] — returns a mapping with exactly the keys system_vendor, product_name, product_serial, product_version, and product_uuid. The serial value doesn't include starting zeros.
Description: Reads /proc/sysinfo on IBM Z / s390 and fills the hardware information so these values appear when gathering facts. Uses os.path.exists to check for the sysinfo file and get_file_content to read its contents, consistent with patterns used by other methods like get_dmi_facts.