Closed asood-rh closed 2 years ago
Hey @asood-rh using badfish via the direct repository in a virtualenv can be problematic due to the way it isolates libaries and your $PYTHONPATH (which is also a good thing and why a lot of people use virtualenv).
You can try the following symlink to get past this where python3.6 is your Python version (adjust as needed)
ln -s {BADFISH_REPO_PATH}/src/helpers {VIRTUALENV_PATH}/lib/python3.6/site-packages/helpers
The ideal way to use badfish here with virtualenv is with podman as while virtualenv can work we can't be certain other libraries won't be added later for future functionality and may not be visible to the virtualenv sandbox.
For reference please see:
https://github.com/redhat-performance/JetSki/issues/186#issuecomment-982666646
This should have been resolved with: https://github.com/redhat-performance/badfish/pull/285
Your System Details ansible --version ansible 2.9.27 config file = /etc/ansible/ansible.cfg configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python3.6/site-packages/ansible executable location = /usr/bin/ansible python version = 3.6.8 (default, Mar 18 2021, 08:58:41) [GCC 8.4.1 20200928 (Red Hat 8.4.1-1)]
Describe the bug Attempting IPI install of openshift failed: [f30-h09-000-r640.rdu2.scalelab.redhat.com] (item=f30-h15-000-r640.rdu2.scalelab.redhat.com) => {"ansible_loop_var": "item", "attempts": 10, "changed": true, "cmd": "source /tmp/ansible.ee2elkx8/.venv/bin/activate\n./src/badfish/badfish.py -u quads -p rdu2@2007 -i config/idrac_interfaces.yml -H mgmt-f30-h15-000-r640.rdu2.scalelab.redhat.com --check-boot\n", "delta": "0:00:00.204177", "end": "2022-06-08 21:49:04.744708", "item": "f30-h15-000-r640.rdu2.scalelab.redhat.com", "msg": "non-zero return code", "rc": 1, "start": "2022-06-08 21:49:04.540531", "stderr": "Traceback (most recent call last):\n File \"./src/badfish/badfish.py\", line 24, in\n from .helpers.async_lru import alru_cache\nModuleNotFoundError: No module named 'main.helpers'; 'main' is not a package", "stderr_lines": ["Traceback (most recent call last):", " File \"./src/badfish/badfish.py\", line 24, in ", " from .helpers.async_lru import alru_cache", "ModuleNotFoundError: No module named 'main.helpers'; 'main' is not a package"], "stdout": "", "stdout_lines": []}
To Reproduce / What were you Doing? Steps to reproduce the behavior: ansible-playbook -i inventory/jetski/hosts playbook-jetski.yml on provisioning node f30-h09-000-r640