Linuxfabrik / lfops

LFOps is an Ansible Collection of generic Roles, Playbooks and Plugins for managing Linux-based Cloud Infrastructures.
https://linuxfabrik.ch
The Unlicense
53 stars 13 forks source link

role:python: On RHEL 8+, don't install `python3`. Instead install `python38` or `python39` explicitly #62

Closed markuslf closed 2 years ago

markuslf commented 2 years ago

Otherwise Python 3.6 is installed, which might be too old nowadays, and you run into problems like that described in https://github.com/Linuxfabrik/monitoring-plugins/issues/587

Python 3.9 preferred.

If multiple Python versions are installed in parallel, set python3 to python3.8 or python3.9.

markuslf commented 2 years ago

Also we get this sometimes if using Python 3.6: /usr/local/lib/python3.6/site-packages/smbprotocol/connection.py:18: CryptographyDeprecationWarning: Python 3.6 is no longer supported by the Python core team. Therefore, support for it is deprecated in cryptography and will be removed in a future release.

markuslf commented 2 years ago

Also install python38-psutil or python39-psutil for the monitoring-plugins.

NavidSassan commented 2 years ago

I would suggest that the role tries to install the latest python verison which is available in the repos. The target of alternatives should be a variable, with possible options latest or a fixed version.

NavidSassan commented 2 years ago

according to https://peps.python.org/pep-0602/#long-term-support-releases there are no explicit LTS versions

NavidSassan commented 2 years ago

we will keep using just python3, as setting the default to python3.9 makes the use of ansible a lot harder. instead we will package the monitoring-plugins with python and all required modules.

markuslf commented 2 years ago

The monitoring-plugins should be deployed via .rpm/.deb per default. This makes everything a lot easier than before - so we also only need to install python when we really need it.