No module named 'ansible.module_utils.openstack'

Bug #1967252 reported by Cédric Jeanneret
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Invalid
High
Cédric Jeanneret

Bug Description

Hello,

While doing node provisioning with metalsmith on my fresh master deploy, I hit the mentioned issue.

It comes from:
https://opendev.org/openstack/metalsmith/src/branch/master/metalsmith_ansible/ansible_plugins/modules/metalsmith_instances.py#L398-L400

If we check the top of that file, we can see the actual import exception is "masked" - so I edited the file, removing the try/except in order to display the actual python error:

2022-03-31 04:41:33.480636 | 24420198-6297-967d-b366-000000000017 | TASK | Reserve instances
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ModuleNotFoundError: No module named 'ansible.module_utils.openstack'
2022-03-31 04:41:33.638778 | 24420198-6297-967d-b366-000000000017 | FATAL | Reserve instances | localhost | error={"changed": false, "module_stderr": "Traceback (most recent call last):\n File \"master:/home/stack/mitogen/ansible_mit
ogen/runner.py\", line 975, in _run\n self._run_code(code, mod)\n File \"master:/home/stack/mitogen/ansible_mitogen/runner.py\", line 939, in _run_code\n exec(code, vars(mod))\n File \"master:/usr/share/ansible/plugins/modules/metalsmith_instances.py\", line 21, in <module>\nModuleNotFoundError: No module named 'ansible.module_utils.openstack'\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}

This happens in my lab, but I'm pretty sure CI will hit it sooner or later.

Here are the involved versions:
python3-metalsmith-1.6.2-0.20220223192700.264836d.el9.noarch
ansible-role-metalsmith-deployment-1.6.2-0.20220223192700.264836d.el9.noarch
ansible-collections-openstack-1.7.2-0.20220323165949.7b26b82.el9.noarch

Weird thing is: packages are pretty old - minimum a week, and I'm using the tripleo-ci-testing line.

Revision history for this message
Cédric Jeanneret (cjeanner) wrote :

Just to clear off any doubts about "may be related to <strategy in use>":

[CentOS-9 - stack@undercloud ~]$ python
Python 3.9.10 (main, Feb 9 2022, 00:00:00)
[GCC 11.2.1 20220127 (Red Hat 11.2.1-9)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from ansible.module_utils.openstack import openstack_full_argument_spec
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'ansible.module_utils.openstack'
>>>

Revision history for this message
Cédric Jeanneret (cjeanner) wrote :

False flag. It *is* mitogen. Setting the strategy to "linear" makes it pass.

Changed in tripleo:
status: Triaged → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.