Imposibble to remove VMs due to "ModuleNotFoundError: No module named 'ipaddr'"

Open
#405 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
linux, python

Research direction

Start with the virsh plugin playbook at /root/.infrared/plugins/virsh/main.yml and the “Get VM network info” task, then inspect the virt_util.py module named in the traceback. Reproduce the infrared virsh removal command and verify that removing undercloud-0 completes without the ModuleNotFoundError for ipaddr.

Written by the indexing model from the issue text.

Description

Releases

SO (Hypervisor-ansible-executor): Red Hat Enterprise Linux release 8.3 (Ootpa)

$ ansible --version
ansible 2.9.19
config file = None
configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /root/infrared/.venv/lib/python3.6/site-packages/ansible
executable location = /root/infrared/.venv/bin/ansible
python version = 3.6.8 (default, Aug 18 2020, 08:33:21) [GCC 8.3.1 20191121 (Red Hat 8.3.1-5)]

Command

$ infrared virsh -o delete.yml --remove-nodes undercloud-0 --host-address localhost --host-key ~/.ssh/id_rsa

Output

...
TASK [Get VM network info] *******************************************************************************************************************************************************************************************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ModuleNotFoundError: No module named 'ipaddr'
fatal: [hypervisor]: FAILED! => {"changed": false, "module_stderr": "Traceback (most recent call last):\n File "", line 102, in \n File "", line 94, in _ansiballz_main\n File "", line 40, in invoke_module\n File "/usr/lib64/python3.6/runpy.py", line 205, in run_module\n return _run_module_code(code, init_globals, run_name, mod_spec)\n File "/usr/lib64/python3.6/runpy.py", line 96, in _run_module_code\n mod_name, mod_spec, pkg_name, script_name)\n File "/usr/lib64/python3.6/runpy.py", line 85, in _run_code\n exec(code, run_globals)\n File "/tmp/ansible_virt_util_payload_qtmepmo9/ansible_virt_util_payload.zip/ansible/modules/virt_util.py", line 21, in \nModuleNotFoundError: No module named 'ipaddr'\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}

NO MORE HOSTS LEFT ***************************************************************************************************************************************************************************************************************************

PLAY RECAP ***********************************************************************************************************************************************************************************************************************************
hypervisor : ok=2 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0

ERROR Playbook "/root/.infrared/plugins/virsh/main.yml" failed!

Dominant language
Jinja
Stars
105
Forks
100
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from redhat-openstack/infrared

All issues in redhat-openstack/infrared

Similar issues

More CLI issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.