redhat-performance / JetSki

Deployment Automation for OpenShift on Baremetal in Red Hat's Shared Labs
Apache License 2.0
21 stars 29 forks source link

Sort out provisioner python version and dependencies #248

Closed afcollins closed 1 year ago

afcollins commented 2 years ago

The python dependencies for ansible are not being installed in the right place. Could be due to a change in the way python is now shipped in RHEL vs the assumptions made from the code.

This condition fails, but may not enough to simply change the python binary, as we need to ensure all python deps are installed in the correct installation.

[kni@f08-h17-b01-5039ms ~]$ /usr/libexec/platform-python --version
Python 3.6.8
[kni@f08-h17-b01-5039ms ~]$ python3 --version
Python 3.8.12
[kni@f08-h17-b01-5039ms ~]$ which python3
/usr/bin/python3
[kni@f08-h17-b01-5039ms ~]$ cat /etc/os-release 
NAME="Rocky Linux"
VERSION="8.6 (Green Obsidian)"
[kni@f08-h17-b01-5039ms ~]$ alternatives --config python
  Selection    Command
-----------------------------------------------
*+ 1           /usr/libexec/no-python
github-actions[bot] commented 2 years ago

Thank you for raising this issue

afcollins commented 2 years ago

The error I see trying to introduce ansible community.kubernetes role is, even though I already ran ansible-galaxy collection install community.kubernetes

An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ModuleNotFoundError: No module named 'kubernetes' fatal: [f08-h17-b01-5039ms.rdu2.scalelab.redhat.com]: FAILED! => {"changed": false, "error": "No module named 'kubernetes'", "msg": "Failed to import the required Python library (kubernetes) on f08-h17-b01-5039ms...'s Python /usr/libexec/platform-python. Please read the module documentation and install it in the appropriate location. If the required library is installed, but Ansible is using the wrong Python interpreter, please consult the documentation on ansible_python_interpreter"}

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days