harbor run -t scale-ai/hil-bench-swe_62-full_infoharbor download scale-ai/hil-bench-swe_62-full_infoOn 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.
Strip ALL leading zeros from the Sequence Code value before storing as product_serial. For example, if /proc/sysinfo contains 'Sequence Code: 00000000000AB1CD', set product_serial to 'AB1CD', NOT '00000000000AB1CD'. Similarly, '0000000000099FED' becomes '99FED'. Do NOT preserve the zero-padded form.
Map the 'Type:' line value to 'product_name', NOT to 'product_version'. For example, if /proc/sysinfo contains 'Type: 8561', set product_name to '8561'. Do NOT assign it to product_version.
Return {} (empty dict) when /proc/sysinfo is absent — do NOT return a dict with 'NA' values. When the file IS present, initialize all five keys to 'NA' and only update keys that have matching data lines. Not all five keys have a corresponding data source in the file, so some keys will remain 'NA'. Do NOT fabricate values or omit keys.