edf-hpc / clara

Cluster Administration tools
Other
18 stars 12 forks source link

clara ipmi parallel send error AttributeError: 'module' object has no attribute 'check_output' #63

Closed hmlth closed 8 years ago

hmlth commented 8 years ago
# clara -d ipmi  XXXX1 reset
clara - DEBUG - ['/usr/bin/clara', 'ipmi', 'XXXX1', 'reset']
clara - DEBUG - ipmi/ipmi_do: ipmitool -I lanplus -H immXXXX1 -U USERID -E -e! mc reset cold
immXXXX1
Traceback (most recent call last):
  File "/usr/bin/clara", line 118, in <module>
    m.main()
  File "/usr/lib/python2.6/dist-packages/clara/plugins/clara_ipmi.py", line 287, in main
    ipmi_do(dargs['<hostlist>'], "mc", "reset", "cold")
  File "/usr/lib/python2.6/dist-packages/clara/plugins/clara_ipmi.py", line 123, in ipmi_do
    print host, result.get()
  File "/usr/lib/python2.6/multiprocessing/pool.py", line 422, in get
    raise self._value
AttributeError: 'module' object has no attribute 'check_output'
rezib commented 8 years ago

Yep, subprocess.check_output() is available on python 2.7+, not in <=2.6.

I guess now that we're using clustershell 1.7 everywhere, we should better rely on it now to run commands such as ipmitool, using the exec worker.