AWX is not recognizing ovirt-engine-sdk-python

Hi,

I’m trying to run a playbook that does some stuff in oVirt, and AWX is telling me: “ovirtsdk4 version 4.3.0 or higher is required for this module”, despite the fact that the module is installed and exists in /var/lib/awx/venv/ansible/.
When running /var/lib/awx/venv/ansible/bin/pip freeze on the both awx_task and awx_web containers, i get:




os-service-types==1.7.0
ovirt-engine-sdk-python==4.3.0


Which i guess indicates that the module is installed correctly

AWX was installed using their official installation guide found on: https://github.com/ansible/awx/blob/devel/INSTALL.md
In addition, the installation of AWX was deployed on a VM on my laptop, for testing purposes.

Any ideas? I have been struggling with this issue for quite a while now, and would appreciate any kind of help.

Thanks

(attachments)

I have learned not to trust these import error messages.

Could you shell in, get a python shell from /var/lib/awx/venv/ansible/bin/python, and then run the import commands from here:

https://github.com/ansible/ansible/blob/92d621202601ec8ac1aed020f6c338655d8a660d/lib/ansible/module_utils/ovirt.py#L33-L36

Specifically

from enum import Enum # enum is a ovirtsdk4 requirement
import ovirtsdk4 as sdk
import ovirtsdk4.version as sdk_version
import ovirtsdk4.types as otypes

If any of those gives an ImportError or ModuleNotFound error, then that’s almost certainly what you’re hitting, and if you’re using the default container images it would probably be a bug.

See https://github.com/ansible/awx/pull/5423, and let me know if this addresses your current issue.

So the imports were indeed the problem.
Specifically, importing ovirtsdk4 did now work properly. I had to install some extra modules and packages in order to it work.
Once i did, the playbook ran flawlessly!

Many thanks for your helpful tips :slight_smile:

BTW, I’ve been using the default containers, so i guess there is a bug with them.
Where (and how) should i report it?

Yes that is a bug, the pull request I linked should fix the container images. So if that gets merged, then it’ll go out in the next AWX release, and from that point hopefully it should work without additional installs.

I had to install some extra modules and packages in order to it work

Was anything needed other than the dnf install -y python3-pycurl?

Im using awx 9.1 and it seems python3-pycurl is still not default present in awx images.