-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ps functions not available with psutil installed #7432
Comments
You are running your minion under python 2.6? |
CentOS 6.4 does not have Python 2.7, so I'm pretty sure this is the case. |
@s0undt3ch Correct on python 2.6, so this does appear to be the issue. I'll see what I can come up with RE: the ps module. |
Thanks, we might be able to add support for the functions available under python 2.6 and not all, but at least some. |
@s0undt3ch look here: |
Thanks @aboe76 @s0undt3ch I removed the check for python > 2.6 and ran the following, which returned values that appear correct:
pgrep, pkill, and kill_pid all also functioned. I think the check should be changed from rather than checking the python version, to check a minimum psutil version. |
@aboe76 I was after which are available under python 2.6 which is what the comment on the code warns us about. |
I'm obviously confused here. My understanding is the ps module is what ultimately utilizes psutil, right? I believe all that's required to restore the ps functionality is to disable the check, as every ps function that makes underlying calls to psutil complete successfully. |
This problem still exists in 0.17.1! Could we please at least reduce the check to <6 instead of <7? The ps module does work on SL6.4/Centos 6.4 (python 2.6.6) with python-psutils installed, so this check really does create problems and I'm not sure solves any these days. Hand editing /usr/lib/python2.6/site-packages/salt/modules/ps.py on the minons such that:
becomes:
fixes the issue on Centos 6.4 and Scientific Linux 6.4, though frankly, I think as others have said, we could remove the version check altogether. |
I've submitted a pull request (#8983) that should resolve this by looking not at the python version, but the version of psutil that is installed. |
Following packages installed from EPEL on CentOS 6.4:
Starting the salt-minion process in the foreground with:
On the master:
And in the minion's log file:
Yet, if I call:
I get back:
The text was updated successfully, but these errors were encountered: