Red Hat Bugzilla – Bug 1479740
import psutil fails frequently
Last modified: 2017-08-09 06:05:17 EDT
Description of problem:
We are using the python-psutil package on EL6 and are frequently encountering the following error :
Traceback (most recent call last):
File "/tmp/ansible_6ujUs4/ansible_module_wait_for.py", line 34, in
File "/usr/lib64/python2.6/site-packages/psutil/__init__.py", line 64, in
import psutil._pslinux as _psplatform
File "/usr/lib64/python2.6/site-packages/psutil/_pslinux.py", line 86, in
_TERMINAL_MAP = _psposix._get_terminal_map()
File "/usr/lib64/python2.6/site-packages/psutil/_psposix.py", line 116, in _get_terminal_map
ret[os.stat(name).st_rdev] = name
OSError: [Errno 2] No such file or directory: '/dev/pts/0'
Version-Release number of selected component (if applicable):
Not always, but very frequently.
I've taken a look at upstream bug tracker and it seems to be :
which is fixed in this commit :
so I believe this is fixed in psutil 0.7.0
In order to try and fix the bug on our side, I rebuilt an rpm based on the epel7 branch, which currently ships python-psutil 2.2.1.
This cured the bug for us.
So, could you please update the el6 branch to match what's in the epel7 branch ?