Bug 1613723 - Exception during task: adding host alias of appliance cause crashing ansible
Summary: Exception during task: adding host alias of appliance cause crashing ansible
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-ansible-collection
Classification: oVirt
Component: manageiq
Version: 1.1.10
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ovirt-4.2.7
: ---
Assignee: Ondra Machacek
QA Contact: Petr Kubica
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-08-08 08:35 UTC by Petr Kubica
Modified: 2018-11-02 14:36 UTC (History)
1 user (show)

Fixed In Version: ovirt-ansible-manageiq-1.1.12
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-11-02 14:33:23 UTC
oVirt Team: Infra
Embargoed:
rule-engine: ovirt-4.2+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github oVirt ovirt-ansible-manageiq pull 63 0 None None None 2018-08-21 10:35:26 UTC

Description Petr Kubica 2018-08-08 08:35:48 UTC
Description of problem:
TASK [ovirt-manageiq : ManageIQ host IP address] ***********************
task path: /usr/share/ansible/roles/oVirt.manageiq/tasks/main.yml:68
ok: [localhost] => {
    "ansible_facts": {
        "miq_ip_addr": []
    }, 
    "changed": false
}

TASK [ovirt-manageiq : Add host alias of appliance] ********************
task path: /usr/share/ansible/roles/oVirt.manageiq/tasks/init_cfme.yml:1
creating host via 'add_host': hostname=[]
ERROR! Unexpected Exception, this is probably a bug: unhashable type: 'list'
the full traceback was:

Traceback (most recent call last):
  File "/usr/bin/ansible-playbook", line 118, in <module>
    exit_code = cli.run()
  File "/usr/lib/python2.7/site-packages/ansible/cli/playbook.py", line 122, in run
    results = pbex.run()
  File "/usr/lib/python2.7/site-packages/ansible/executor/playbook_executor.py", line 159, in run
    result = self._tqm.run(play=play)
  File "/usr/lib/python2.7/site-packages/ansible/executor/task_queue_manager.py", line 289, in run
    play_return = strategy.run(iterator, play_context)
  File "/usr/lib/python2.7/site-packages/ansible/plugins/strategy/linear.py", line 323, in run
    results += self._wait_on_pending_results(iterator)
  File "/usr/lib/python2.7/site-packages/ansible/plugins/strategy/__init__.py", line 674, in _wait_on_pending_results
    results = self._process_pending_results(iterator)
  File "/usr/lib/python2.7/site-packages/ansible/plugins/strategy/__init__.py", line 117, in inner
    results = func(self, iterator, one_pass=one_pass, max_passes=max_passes)
  File "/usr/lib/python2.7/site-packages/ansible/plugins/strategy/__init__.py", line 582, in _process_pending_results
    self._add_host(new_host_info, iterator)
  File "/usr/lib/python2.7/site-packages/ansible/plugins/strategy/__init__.py", line 692, in _add_host
    if host_name not in self._inventory.hosts:
TypeError: unhashable type: 'list'
***** END OF OUTPUT *****

Version-Release number of selected component (if applicable):
ovirt-ansible-manageiq-1.1.11-1.el7ev.noarch
ansible-2.6.2-1.el7ae.noarch

How reproducible:
always

Comment 1 Petr Kubica 2018-08-08 08:41:46 UTC
same error with version ansible-2.6.2-1.el7ae.noarch

Comment 2 Ondra Machacek 2018-08-08 09:53:51 UTC
The problem is that ManageIQ VM reports IPv6, so we think that network is initialized, but we don't later find IPv4. So it crashes to add the IP to inventory.

Comment 3 Petr Kubica 2018-08-27 11:00:31 UTC
Verified in 
ovirt-ansible-manageiq-1.1.12-0.1.master.20180823081650.el7.noarch

Comment 4 Raz Tamir 2018-09-05 08:55:28 UTC
QE verification bot: the bug was verified upstream

Comment 5 Sandro Bonazzola 2018-11-02 14:33:23 UTC
This bugzilla is included in oVirt 4.2.7 release, published on November 2nd 2018.

Since the problem described in this bug report should be
resolved in oVirt 4.2.7 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.


Note You need to log in before you can comment on or make changes to this bug.