redhat-performance/JetSki

Shared-labs-prep role use of badfish via virtual env fails with module not found.

mordechai opened this issue · 4 comments

Shared-labs-prep role use of badfish via virtual env fails with module not found.
When reproduced you'll notice looping of rescue attempts to Reset Idrace because badfish --clear-jobs --force fails with:
src/badfish/badfish.py\", line 23, in \n from helpers.async_lru import alru_cache\nModuleNotFoundError

This happens in shared-lab-prep tasks 10_redfish_queue.yml and 20_set_director_mode.yml which use virtual env to run badfish.

To workaround this you can specify the git path of badfish and remove use of virtual env.
Likely a better fix would be to re-purpose the podman setup of badfish which happens in a later role to be used here, and avoid the duplication of badfish setup, additionally badfish now offers badfish as os package.

Thank you for raising this issue

We introduced a change recently that inadvertently affected the virtualenv setup. We are likely not going to revert this as using the virtualenv solution is not something we would like to support in the long run.
If you would like to keep using this workflow I suggest you include on your scripts the symlink action for the library to find the missing module.

ln -s {BADFISH_REPO_PATH}/src/helpers {VIRTUALENV_PATH}/lib/python3.10/site-packages/helpers

We will amend the docs to include this additional instruction for the time being.

@mordechai could you test this patch - mukrishn@bd3a788.
As a long term solution, will update this piece to use podman command.

@mukrishn 'badfish missing library #188 works thank you.