Description of problem: Introspection fails with ValueError: too many values to unpack -- ~~~ Traceback (most recent call last): File "/usr/bin/hardware-detect", line 10, in <module> sys.exit(main()) File "/usr/lib/python2.7/site-packages/hardware/detect.py", line 997, in main _main(options) File "/usr/lib/python2.7/site-packages/hardware/detect.py", line 924, in _main if not detect_system(hrdw): File "/usr/lib/python2.7/site-packages/hardware/detect.py", line 666, in detect_system get_cpus(hw_lst) File "/usr/lib/python2.7/site-packages/hardware/detect.py", line 699, in get_cpus item, value = line.split(\':\') ValueError: too many values to unpack ~~~ Version-Release number of selected component (if applicable): likely python-hardware-detect-0.18.1-0.20190301121902.b417976.el7ost.noarch.rpm How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info: ~~~ (...) 2019-06-25 10:00:41.373 1 ERROR ironic_inspector.utils [req-a7e27f27-a007-4e01-bc34-be4737550fa2 - - - - -] [node: MAC ... BMC 10.227.9.93] The following failures happened during running pre-processing hooks: Preprocessing hook ramdisk_error: Ramdisk reported error: The following errors were encountered: * failed to run hardware-detect utility: Unexpected error while running command. Command: hardware-detect Exit code: 1 Stdout: u'' Stderr: u'/bin/sh: cli64: command not found\nInfo: detect_areca: No controller found\nCannot find megacli on the system\nread_smart: Reading S.M.A.R.T information on /dev/sda\nread_smart_ata: Found S.M.A.R.T information on /dev/sda\nread_smart: Reading S.M.A.R.T information on /dev/sdb\nread_smart_ata: Found S.M.A.R.T information on /dev/sdb\nconnect: Connection refused\nFailed to connect to lldpad - clif_open: Invalid argument\nconnect: Connection refused\nFailed to connect to lldpad - clif_open: Invalid argument\nconnect: Connection refused\nFailed to connect to lldpad - clif_open: Invalid argument\nconnect: Connection refused\nFailed to connect to lldpad - clif_open: Invalid argument\nconnect: Connection refused\nFailed to connect to lldpad - clif_open: Invalid argument\nconnect: Connection refused\nFailed to connect to lldpad - clif_open: Invalid argument\nTraceback (most recent call last):\n File "/usr/bin/hardware-detect", line 10, in <module>\n sys.exit(main())\n File "/usr/lib/python2.7/site-packages/hardware/detect.py", line 997, in main\n _main(options)\n File "/usr/lib/python2.7/site-packages/hardware/detect.py", line 924, in _main\n if not detect_system(hrdw):\n File "/usr/lib/python2.7/site-packages/hardware/detect.py", line 666, in detect_system\n get_cpus(hw_lst)\n File "/usr/lib/python2.7/site-packages/hardware/detect.py", line 699, in get_cpus\n item, value = line.split(\':\')\nValueError: too many values to unpack\n' Node not found hook failed: Node 9c1c82ef-8e92-4ac0-9745-2974605a51cb already has BMC address 10.227.9.93, not enrolling 2019-06-25 10:00:41.374 1 DEBUG ironic_inspector.main [req-a7e27f27-a007-4e01-bc34-be4737550fa2 - - - - -] Returning error to client: The following failures happened during running pre-processing hooks: Preprocessing hook ramdisk_error: Ramdisk reported error: The following errors were encountered: * failed to run hardware-detect utility: Unexpected error while running command. Command: hardware-detect Exit code: 1 Stdout: u'' Stderr: u'/bin/sh: cli64: command not found\nInfo: detect_areca: No controller found\nCannot find megacli on the system\nread_smart: Reading S.M.A.R.T information on /dev/sda\nread_smart_ata: Found S.M.A.R.T information on /dev/sda\nread_smart: Reading S.M.A.R.T information on /dev/sdb\nread_smart_ata: Found S.M.A.R.T information on /dev/sdb\nconnect: Connection refused\nFailed to connect to lldpad - clif_open: Invalid argument\nconnect: Connection refused\nFailed to connect to lldpad - clif_open: Invalid argument\nconnect: Connection refused\nFailed to connect to lldpad - clif_open: Invalid argument\nconnect: Connection refused\nFailed to connect to lldpad - clif_open: Invalid argument\nconnect: Connection refused\nFailed to connect to lldpad - clif_open: Invalid argument\nconnect: Connection refused\nFailed to connect to lldpad - clif_open: Invalid argument\nTraceback (most recent call last):\n File "/usr/bin/hardware-detect", line 10, in <module>\n sys.exit(main())\n File "/usr/lib/python2.7/site-packages/hardware/detect.py", line 997, in main\n _main(options)\n File "/usr/lib/python2.7/site-packages/hardware/detect.py", line 924, in _main\n if not detect_system(hrdw):\n File "/usr/lib/python2.7/site-packages/hardware/detect.py", line 666, in detect_system\n get_cpus(hw_lst)\n File "/usr/lib/python2.7/site-packages/hardware/detect.py", line 699, in get_cpus\n item, value = line.split(\':\')\nValueError: too many values to unpack\n' Node not found hook failed: Node 9c1c82ef-8e92-4ac0-9745-2974605a51cb already has BMC address 10.227.9.93, not enrolling error_response /usr/lib/python2.7/site-packages/ironic_inspector/main.py:69 2019-06-25 10:00:41.375 1 INFO werkzeug [req-a7e27f27-a007-4e01-bc34-be4737550fa2 - - - - -] 10.227.10.220 - - [25/Jun/2019 10:00:41] "POST /v1/continue HTTP/1.1" 400 - (...) ~~~ ~~~ [akaris@wks-akaris ~]$ cat<<'EOF' | sed 's/\\n/\n/g' > /bin/sh: cli64: command not found\nInfo: detect_areca: No controller found\nCannot find megacli on the system\nread_smart: Reading S.M.A.R.T information on /dev/sda\nread_smart_ata: Found S.M.A.R.T information on /dev/sda\nread_smart: Reading S.M.A.R.T information on /dev/sdb\nread_smart_ata: Found S.M.A.R.T information on /dev/sdb\nconnect: Connection refused\nFailed to connect to lldpad - clif_open: Invalid argument\nconnect: Connection refused\nFailed to connect to lldpad - clif_open: Invalid argument\nconnect: Connection refused\nFailed to connect to lldpad - clif_open: Invalid argument\nconnect: Connection refused\nFailed to connect to lldpad - clif_open: Invalid argument\nconnect: Connection refused\nFailed to connect to lldpad - clif_open: Invalid argument\nconnect: Connection refused\nFailed to connect to lldpad - clif_open: Invalid argument\nTraceback (most recent call last):\n File "/usr/bin/hardware-detect", line 10, in <module>\n sys.exit(main())\n File "/usr/lib/python2.7/site-packages/hardware/detect.py", line 997, in main\n _main(options)\n File "/usr/lib/python2.7/site-packages/hardware/detect.py", line 924, in _main\n if not detect_system(hrdw):\n File "/usr/lib/python2.7/site-packages/hardware/detect.py", line 666, in detect_system\n get_cpus(hw_lst)\n File "/usr/lib/python2.7/site-packages/hardware/detect.py", line 699, in get_cpus\n item, value = line.split(\':\')\nValueError: too many values to unpack\n > EOF /bin/sh: cli64: command not found Info: detect_areca: No controller found Cannot find megacli on the system read_smart: Reading S.M.A.R.T information on /dev/sda read_smart_ata: Found S.M.A.R.T information on /dev/sda read_smart: Reading S.M.A.R.T information on /dev/sdb read_smart_ata: Found S.M.A.R.T information on /dev/sdb connect: Connection refused Failed to connect to lldpad - clif_open: Invalid argument connect: Connection refused Failed to connect to lldpad - clif_open: Invalid argument connect: Connection refused Failed to connect to lldpad - clif_open: Invalid argument connect: Connection refused Failed to connect to lldpad - clif_open: Invalid argument connect: Connection refused Failed to connect to lldpad - clif_open: Invalid argument connect: Connection refused Failed to connect to lldpad - clif_open: Invalid argument Traceback (most recent call last): File "/usr/bin/hardware-detect", line 10, in <module> sys.exit(main()) File "/usr/lib/python2.7/site-packages/hardware/detect.py", line 997, in main _main(options) File "/usr/lib/python2.7/site-packages/hardware/detect.py", line 924, in _main if not detect_system(hrdw): File "/usr/lib/python2.7/site-packages/hardware/detect.py", line 666, in detect_system get_cpus(hw_lst) File "/usr/lib/python2.7/site-packages/hardware/detect.py", line 699, in get_cpus item, value = line.split(\':\') ValueError: too many values to unpack ~~~ Just checking in the repositories: ~~~ [root@overcloud-controller-0 ~]# yum provides '*hardware/detect.py' Loaded plugins: product-id, search-disabled-repos, subscription-manager python-hardware-detect-0.18.1-0.20180219184858.f649210.el7ost.noarch : Hardware detection and classification utilities Repo : rhel-7-server-openstack-13-rpms Matched from: Filename : /usr/lib/python2.7/site-packages/hardware/detect.py python-hardware-detect-0.18.1-0.20180516112600.eb66b8c.el7ost.noarch : Hardware detection and classification utilities Repo : rhel-7-server-openstack-13-rpms Matched from: Filename : /usr/lib/python2.7/site-packages/hardware/detect.py ~~~ Upstream: https://github.com/redhat-cip/hardware/blob/master/hardware/detect.py And this must be here more or less: https://github.com/redhat-cip/hardware/blob/master/hardware/detect.py#L668 Looking at the OSP 14 RPM: https://access.redhat.com/downloads/content/python-hardware-detect/0.18.1-0.20190301121902.b417976.el7ost/noarch/fd431d51/package Indeed, after extracting with: `rpm2cpio python-hardware-detect-0.18.1-0.20190301121902.b417976.el7ost.noarch.rpm | cpio -idmv` /home/akaris/cases/02412118/usr/lib/python2.7/site-packages/hardware/detect.py ~~~ (...) 692 def get_cpus(hw_lst): 693 # Extracting lspcu information 694 lscpu = {} 695 output = detect_utils.output_lines('LANG=en_US.UTF-8 lscpu') 696 697 for line in output: 698 if ':' in line: 699 item, value = line.split(':') <---------------------------------- we fail here 700 lscpu[item.strip(':')] = value.strip() 701 702 # Extracting lspcu -x information 703 lscpux = {} 704 output = detect_utils.output_lines('LANG=en_US.UTF-8 lscpu -x') 705 706 for line in output: 707 if ':' in line: 708 item, value = line.split(':') 709 lscpux[item.strip(':')] = value.strip() 710 711 hw_lst.append(("cpu", "physical", "number", int(lscpu["Socket(s)"]))) 712 for processor in range(int(lscpu["Socket(s)"])): 713 boost = "/sys/devices/system/cpu/cpufreq/boost" 714 if os.path.exists(boost): 715 with open(boost) as boostfile: 716 value = boostfile.readline().rstrip('\n') 717 if value == "1": 718 value = "enabled" 719 else: 720 value = "disabled" 721 hw_lst.append( 722 ('cpu', "physical_{}".format(processor), 'boost', value)) 723 724 hw_lst.append(('cpu', "physical_{}".format( 725 processor), 'vendor', lscpu['Vendor ID'])) 726 hw_lst.append(('cpu', "physical_{}".format( 727 processor), 'product', lscpu['Model name'])) 728 hw_lst.append(('cpu', "physical_{}".format( 729 processor), 'cores', int(lscpu['Core(s) per socket']))) 730 hw_lst.append(('cpu', "physical_{}".format( 731 processor), 'threads', int(lscpu['Thread(s) per core']) * int(lscpu['Core(s) per socket']))) 732 hw_lst.append(('cpu', "physical_{}".format( (...) ~~~
How can we best narrow down why this fails?
Fix is in 0.21.1 - https://github.com/redhat-cip/hardware/releases
Fix is in python-hardware release 0.21.1 - https://github.com/redhat-cip/hardware/releases. We need to have a version built for osp-14. Thierry - would it be possible to build python-hardware for OSP-14?
Hi, The customer just re-ran Ironic Inspector on the same system, one with production processors (no colon in name), one with pre-preproduction (with colon), and they get the error again. Any ETA for this issue? Thanks, Andreas
Andreas - the fix is available upstream but hasn't been pulled into an IPA zstream release yet, it will be in z5 along with other python-hardware fixes.
Hi Bob, Great, thanks for that info! - Andreas
Andreas - it won't be in the z4 release next week as we need a new upstream release with the most recent python-hardware fixes. It will be in the release after that.
Closing this due to EOL, fix will be in OSP-13/15/16 etc.