Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1720111

Summary: oVirt.vm-infra role fails on ovirtvmipv4() call when included in a play after oVirt.image-template
Product: [oVirt] ovirt-ansible-collection Reporter: Jan Zmeskal <jzmeskal>
Component: vm-infraAssignee: Ondra Machacek <omachace>
Status: CLOSED ERRATA QA Contact: Jan Zmeskal <jzmeskal>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 1.1.10CC: bugs, dfediuck, lleistne, rdlugyhe, sradco
Target Milestone: ovirt-4.3.4-1   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-ansible-image-template-1.1.11 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-07-08 09:18:44 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jan Zmeskal 2019-06-13 07:40:46 UTC
Description of problem:
I am testing playbook deploying OCP on top of RHV. See the playbook here: https://github.com/openshift/openshift-docs/pull/15154/files#diff-efe17334f700faa59826a4fc569c5aa9R53

In that playbook, oVirt.image-template and oVirt.vm-infra are used like that:
  roles:
    - oVirt.image-template
    - oVirt.vm-infra

During the execution of oVirt.vm-infra (specifically TASK [oVirt.vm-infra : Wait for VMs IP]), the following error is thrown: http://pastebin.test.redhat.com/771423

After consultation with Ondra Machacek, it seems that the regression has been introduced by this commit: https://github.com/oVirt/ovirt-ansible-vm-infra/commit/a6f12ec945adca1845c50215f49f815ef6d8ee95

According to Ondra, the error is caused by Ansible caching. The filter with the same name is cached from role oVirt.image-template, the does not support network_ip argument. 

I believe this either has to be fixed (maybe by updating filter in oVirt.image-template) or any such limitations imposed by Ansible caching should be documented in the role's README. 

Version-Release number of selected component (if applicable):
ansible 2.8.1
oVirt.vm-infra 1.1.15


How reproducible:
100 %


Steps to Reproduce:
1. Create a playbook that includes two aforementioned roles to first create a template in engine and then create a VM from it. Or just run the playbook that creates bastion for OCP on RHV deployment.

Actual results:
The playbook fails with error.

Expected results:
User should either
a) be able to use oVirt.image-template and oVirt.vm-infra in one playbook as expected or
b) be made aware of such limitations so they can design their playbook around them.

Comment 6 Jan Zmeskal 2019-06-25 11:02:47 UTC
Verified with package:
ovirt-ansible-image-template-1.1.11-1.el7ev.noarch

I ran this playbook that uses both oVirt.image-template and oVirt.vm-ifnra to verify: http://pastebin.test.redhat.com/774696

Comment 9 errata-xmlrpc 2019-07-08 09:18:44 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2019:1697