Bug 1877862

Summary: UPI: condition on templates existence does not work and avoid get_url check
Product: OpenShift Container Platform Reporter: Roberto Ciatti <rciatti>
Component: InstallerAssignee: OCP on RHV Team <ocprhvteam>
Installer sub component: OpenShift on RHV QA Contact: Jan Zmeskal <jzmeskal>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: medium CC: bleanhar, jzmeskal
Version: 4.6   
Target Milestone: ---   
Target Release: 4.6.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-10-27 16:39:40 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Roberto Ciatti 2020-09-10 15:57:29 UTC
Description of problem:

When we check whether to run ovirt.image-tempalte role in create-templates-and-vms.yml, we use this condition: 

https://github.com/openshift/installer/blob/3883bef22659ec4fd636f675021ed3f98ed62804/upi/ovirt/create-templates-and-vms.yml#L67

However, this never resolves to true due to the fact that the templates list is actually a list of list


How reproducible:
Always

Steps to Reproduce:
1. launch the ansible-playbook -i inventory.yml create-templates-and-vms.yml
2. check that it downloads and uncompress the qcow2 image, creates templates and vms 
3. launch again the ansible-playbook -i inventory.yml create-templates-and-vms.yml


Actual results:
- check the remote image url (standard behaviour of ansible get_url)\
- re-create templates despite they already exists

Expected results:
skips both the download and the uncompress of the image (without reaching the remote image url) and skips also the templates creation

Comment 2 Sandro Bonazzola 2020-09-14 09:29:59 UTC
Handled only last week, needs QA, will be handled in upcoming sprint

Comment 3 Jan Zmeskal 2020-09-22 11:07:04 UTC
Verified by reviewing the associated PR.

Comment 7 errata-xmlrpc 2020-10-27 16:39:40 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 (OpenShift Container Platform 4.6 GA Images), 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-2020:4196