-
Notifications
You must be signed in to change notification settings - Fork 52
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
Let salt-ssh use 'platform-python' binary in RHEL8 #191
Let salt-ssh use 'platform-python' binary in RHEL8 #191
Conversation
salt/client/ssh/__init__.py
Outdated
@@ -147,7 +147,7 @@ | |||
then SUDO="sudo " | |||
fi | |||
EX_PYTHON_INVALID={EX_THIN_PYTHON_INVALID} | |||
PYTHON_CMDS="python3 python27 python2.7 python26 python2.6 python2 python" | |||
PYTHON_CMDS="python3 /usr/libexec/platform-python3.6 python27 python2.7 python26 python2.6 python2 python" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a minor question - why not doing it more generic? like:
PYTHON_CMDS="python3 /usr/libexec/platform-python3.6 python27 python2.7 python26 python2.6 python2 python" | |
PYTHON_CMDS="python3 /usr/libexec/platform-python python27 python2.7 python26 python2.6 python2 python" |
Would that work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if that work, I would move it to the end of the list, so in case that another python package is installed, that will be used
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well, python 3 should be prefered over python 2.
The code iterrate over the list and the first wins.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@meaksh I wanted to explicitly add the version so the ordering is clear, but since it's not 3
but 3.6
, I think your suggestion makes sense to future-proof this.
RHEL/CentOS 8 has an internal Python interpreter called 'platform-python' included in the base setup. Add this binary to the list of Python executables to look for when creating the sh shim.
RHEL/CentOS 8 has an internal Python interpreter called 'platform-python' included in the base setup. Add this binary to the list of Python executables to look for when creating the sh shim.
RHEL/CentOS 8 has an internal Python interpreter called 'platform-python' included in the base setup. Add this binary to the list of Python executables to look for when creating the sh shim.
RHEL/CentOS 8 has an internal Python interpreter called 'platform-python' included in the base setup. Add this binary to the list of Python executables to look for when creating the sh shim.
RHEL/CentOS 8 has an internal Python interpreter called 'platform-python' included in the base setup. Add this binary to the list of Python executables to look for when creating the sh shim.
RHEL/CentOS 8 has an internal Python interpreter called 'platform-python' included in the base setup. Add this binary to the list of Python executables to look for when creating the sh shim.
RHEL/CentOS 8 has an internal Python interpreter called 'platform-python' included in the base setup. Add this binary to the list of Python executables to look for when creating the sh shim.
RHEL/CentOS 8 has an internal Python interpreter called 'platform-python' included in the base setup. Add this binary to the list of Python executables to look for when creating the sh shim.
RHEL/CentOS 8 has an internal Python interpreter called 'platform-python' included in the base setup. Add this binary to the list of Python executables to look for when creating the sh shim.
RHEL/CentOS 8 has an internal Python interpreter called 'platform-python' included in the base setup. Add this binary to the list of Python executables to look for when creating the sh shim.
RHEL/CentOS 8 has an internal Python interpreter called 'platform-python' included in the base setup. Add this binary to the list of Python executables to look for when creating the sh shim.
RHEL/CentOS 8 has an internal Python interpreter called 'platform-python' included in the base setup. Add this binary to the list of Python executables to look for when creating the sh shim.
RHEL/CentOS 8 has an internal Python interpreter called 'platform-python' included in the base setup. Add this binary to the list of Python executables to look for when creating the sh shim.
RHEL/CentOS 8 has an internal Python interpreter called 'platform-python' included in the base setup. Add this binary to the list of Python executables to look for when creating the sh shim.
RHEL/CentOS 8 has an internal Python interpreter called 'platform-python' included in the base setup. Add this binary to the list of Python executables to look for when creating the sh shim.
RHEL/CentOS 8 has an internal Python interpreter called 'platform-python' included in the base setup. Add this binary to the list of Python executables to look for when creating the sh shim.
RHEL/CentOS 8 has an internal Python interpreter called 'platform-python' included in the base setup. Add this binary to the list of Python executables to look for when creating the sh shim.
RHEL/CentOS 8 has an internal Python interpreter called 'platform-python' included in the base setup. Add this binary to the list of Python executables to look for when creating the sh shim.
RHEL/CentOS 8 has an internal Python interpreter called 'platform-python' included in the base setup. Add this binary to the list of Python executables to look for when creating the sh shim.
RHEL/CentOS 8 has an internal Python interpreter called 'platform-python' included in the base setup. Add this binary to the list of Python executables to look for when creating the sh shim.
RHEL/CentOS 8 has an internal Python interpreter called 'platform-python' included in the base setup. Add this binary to the list of Python executables to look for when creating the sh shim.
RHEL/CentOS 8 has an internal Python interpreter called 'platform-python' included in the base setup. Add this binary to the list of Python executables to look for when creating the sh shim.
RHEL/CentOS 8 has an internal Python interpreter called 'platform-python' included in the base setup. Add this binary to the list of Python executables to look for when creating the sh shim.
RHEL/CentOS 8 has an internal Python interpreter called 'platform-python' included in the base setup. Add this binary to the list of Python executables to look for when creating the sh shim.
RHEL/CentOS 8 has an internal Python interpreter called 'platform-python'
included in the base setup.
Add this binary to the list of Python executables to look for when creating the sh shim.
What issues does this PR fix or reference?
Previous Behavior
In RHEL8,
salt-ssh
failed unless Python is installed from the Python module.New Behavior
salt-ssh
works with the baseplatform-python
binary.Tests written?
No
Commits signed with GPG?
Yes
Please review Salt's Contributing Guide for best practices.
See GitHub's page on GPG signing for more information about signing commits with GPG.