Fix running the CPU plugin with procfs from pypi#607
Fix running the CPU plugin with procfs from pypi#607superm1 wants to merge 1 commit intoredhat-performance:masterfrom
Conversation
Using the latest procfs from pypi fails because it doesn't have a cpuinfo() member. Catch these exceptions and try to more gracefully handle them instead of a traceback from the daemon. Link: https://pypi.org/project/procfs/
|
BTW - this was on Ubuntu 22.04, I ran into this problem. I didn't have anything natively installed for procfs which is why I went to pypi. If I But nonetheless it's better to be defensive against this problem IMO. |
|
FWIW, the |
|
Right I was working from source is why I hit this. It shares the same namespace tho. And even if I install the right one in Ubuntu if this one from pypi is installed it takes preference and causes the breakage due to search path priority. |
|
I think if we want to handle this, we should detect the wrong library at the import and log error or warning that it's incompatible library. |
Using the latest procfs from pypi fails because it doesn't have a cpuinfo() member. Catch these exceptions and try to more gracefully handle them instead of a traceback from the daemon.
Link: https://pypi.org/project/procfs/