Description of problem: Failed to generate the mapping file for DR flow(active-passive) on the ovirt-engine as the master site. # ./ovirt-dr generate Traceback (most recent call last): File "./ovirt-dr", line 15, in <module> import fail_back File "/usr/share/ansible/collections/ansible_collections/redhat/rhv/roles/disaster_recovery/files/fail_back.py", line 14, in <module> from ansible.module_utils.six.moves import input ModuleNotFoundError: No module named 'ansible' Version-Release number of selected component (if applicable): ovirt-engine-4.5.0.7-0.9.el8ev.noarch ansible-core-2.12.2-3.1.el8.x86_64 # rpm -qa | grep ansible ansible-core-2.12.2-3.1.el8.x86_64 python38-ansible-runner-2.1.3-1.el8ev.noarch ansible-collection-ansible-utils-2.3.0-2.2.el8ev.noarch ansible-collection-ansible-posix-1.3.0-1.2.el8ev.noarch ansible-runner-2.1.3-1.el8ev.noarch ansible-collection-ansible-netcommon-2.2.0-3.2.el8ev.noarch ovirt-ansible-collection-2.0.3-1.el8ev.noarch How reproducible: 100% Steps to Reproduce: 1. Go to /usr/share/ansible/collections/ansible_collections/ovirt/ovirt/roles/disaster_recovery/files/ 2. After setting the dr.conf file to the DR's environment information, generate the mapping file: "./ovirt-dr generate" Actual results: The file is not generated due to import failure in fail_back.py line 14: ModuleNotFoundError: No module named 'ansible' Expected results: The script should succeed to generate the mapping file mapping_vars.yml without any errors Additional info: Worked in ovirt-engine 4.4
As a workaround to generate the mapping file I installed the missing package by "pip3 install ansible" and then the generate worked.
Verified. # ./ovirt-dr generate Log file: '/tmp/ovirt-dr-1655644080939.log' [WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all' [WARNING]: running playbook inside collection redhat.rhv [Generate Mapping File] Finished generating variable mapping file for oVirt ansible disaster recovery. Log file: '/tmp/ovirt-dr-1655644080939.log' Versions: ansible-core-2.12.2-3.1.el8.x86_64 engine-4.5.1.2-0.11.el8ev vdsm-4.50.1.3-1.el8ev
This bugzilla is included in oVirt 4.5.1 release, published on June 22nd 2022. Since the problem described in this bug report should be resolved in oVirt 4.5.1 release, it has been closed with a resolution of CURRENT RELEASE. If the solution does not work for you, please open a new bug report.