redhat-cip / edeploy

Linux systems provisioning and updating made easy
Apache License 2.0
92 stars 38 forks source link

hardware-detect cmd infiniband fail #236

Closed talset closed 9 years ago

talset commented 9 years ago

I have this error on hardware-detect

  Info: detect_hpa : controller 0 : The specified controller does not have any physical drives on it.
  Cannot get device pause settings: Operation not supported
  modprobe: FATAL: Module ipmi_smb not found.
  Info: Probing ipmi_si failed
  Info: Probing ipmi_devintf failed
  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 814, in main
      _main(options)
    File "/usr/lib/python2.7/site-packages/hardware/detect.py", line 776, in _main
      detect_infiniband(hrdw)
    File "/usr/lib/python2.7/site-packages/hardware/detect.py", line 367, in detect_infiniband
      ib_infos = ib.ib_global_info(card_type)
    File "/usr/lib/python2.7/site-packages/hardware/infiniband.py", line 40, in ib_global_info
      global_info = cmd('ibstat %s -s' % card_drv)
  TypeError: not all arguments converted during string formatting

I notice that old use of cmd return https://github.com/enovance/hardware/blame/65fe16757f22ade7a2739e0297989115c3f5794b/hardware/infiniband.py#L20

  >>> from commands import getoutput as cmd
  >>> cmd("echo foo")
  'foo'

But cmd changed and currently return a tuple https://github.com/enovance/hardware/blob/master/hardware/infiniband.py#L27 (ib_card_drv use cmd)

  >>> from hardware.detect_utils import cmd
  >>> cmd("echo foo")
  (0, 'foo\n')

Same on this lines :

Have you any idea of why this changes doesn't broke the unittest ?

Regards, Florian

talset commented 9 years ago

hardware module, moved on https://github.com/enovance/hardware/issues/13