Bug 1858418 - [OCPonRHV] OpenShift installer fails when Blank template is missing in oVirt/RHV
Summary: [OCPonRHV] OpenShift installer fails when Blank template is missing in oVirt/RHV
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 4.3.z
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: 4.11.0
Assignee: Janos Bonic
QA Contact: Michael Burman
URL:
Whiteboard:
Depends On: 2082283
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-07-17 21:30 UTC by ldenny
Modified: 2022-08-10 10:36 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-08-10 10:35:34 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github oVirt go-ovirt-client pull 86 0 None Merged Blank template handling 2022-07-21 18:11:59 UTC
Github oVirt terraform-provider-ovirt pull 383 0 None Merged Fixes #377: Bug 1858418: ovirt_blank_template resource 2022-07-21 18:12:00 UTC
Github openshift installer pull 3912 0 None closed Bug 1858418: ovirt_template: Increase ovirt_templates search criteria 2022-07-21 18:12:01 UTC
Github openshift installer pull 5034 0 None Merged ovirt: split terraform into stages 2022-07-21 18:12:01 UTC
Github openshift installer pull 5867 0 None Merged Bug 2082283: Transition to the oVirt Terraform provider v2 2022-07-21 18:12:01 UTC
Red Hat Product Errata RHSA-2022:5069 0 None None None 2022-08-10 10:36:06 UTC

Internal Links: 2082283

Description ldenny 2020-07-17 21:30:37 UTC
Description of problem:

When running `openshift-install create cluster` I get the following error:
~~~
ERROR Error: your query returned no results, please change your search criteria and try again 
ERROR                                              
ERROR   on ../../../../tmp/openshift-install-530802440/template/main.tf line 11, in data "ovirt_templates" "osImage": 
ERROR   11: data "ovirt_templates" "osImage" {
~~~

Looking at `data/data/ovirt/template/main.tf`[1] we can see it is looking for a template named `name=${var.openstack_base_image_name}` OR `name=Blank`

I don't have a template named Blank, in my environment mine is named Blank1 and this is not captured in the above search criteria.

Changing `name=Blank` to `name=Blank*` captures my template name and allows the install to complete.

I believe the template named `Blank` is the default in Ovirt, I am not sure how mine ended up as 'Blank1' but it seems to be a pretty easy issue to mitigate.

[1]https://github.com/openshift/installer/blob/30682e748f91c47b2f612fee65cc19926ca59965/data/data/ovirt/template/main.tf#L11-L16


Version-Release number of the following components:
~~~
$ openshift-install version
openshift-install 4.5.0-0.okd-2020-07-14-153706-ga

[root@ovirt ~]# rpm -q ansible
ansible-2.9.10-1.el7.noarch

[root@ovirt ~]# ansible --version
ansible 2.9.10

[root@ovirt ~]# rpm -q ovirt-engine
ovirt-engine-4.3.10.4-1.el7.noarch
~~~

How reproducible:
Every time. It can be manually worked around by creating a template called "Blank" in Ovirt.

Comment 1 Sandro Bonazzola 2020-09-14 09:31:32 UTC
Douglas is not available, re-assigning and re-evaluating for upcoming sprint.

Comment 2 Sandro Bonazzola 2020-10-22 11:36:01 UTC
due to capacity constraints we will be revisiting this bug in the upcoming sprint

Comment 3 Sandro Bonazzola 2020-12-03 12:50:10 UTC
Need to understand in what situation make sense to not have blank template around.

Comment 8 Gal Zaidman 2021-01-27 08:52:25 UTC
due to capacity constraints we will be revisiting this bug in the upcoming sprint

Comment 11 Sandro Bonazzola 2021-03-09 12:10:14 UTC
Moving back to NEW, no relevant patch open for this bug.

Comment 12 Gal Zaidman 2021-03-30 13:38:08 UTC
due to capacity constraints, we will be revisiting this bug in the upcoming sprint

Comment 13 Gal Zaidman 2021-05-10 12:29:30 UTC
due to capacity constraints, we will be revisiting this bug in the upcoming sprint

Comment 14 Janos Bonic 2021-07-01 11:07:49 UTC
Still an issue, will be fixed when we switch to the new client library and add template finding logic.

Comment 15 Gal Zaidman 2021-07-05 12:40:16 UTC
(In reply to Janos Pasztor from comment #14)
> Still an issue, will be fixed when we switch to the new client library and
> add template finding logic.

Will be fixed by https://github.com/openshift/installer/pull/5034

Comment 17 Janos Bonic 2021-11-24 20:03:09 UTC
Added a PR in go-ovirt-client that attempts to resolve this issue by scanning templates if they are truly blank.

Comment 21 Janos Bonic 2022-06-21 07:09:03 UTC
Fixed in 2082283

Comment 22 Michael Burman 2022-06-21 08:28:34 UTC
(In reply to Janos Bonic from comment #21)
> Fixed in 2082283

Fixed in bz 2082283

Comment 23 Michael Burman 2022-06-23 13:00:16 UTC
The issue is gone.
Such terraform errors no longer visible in the installer.

Also important to state that it's no longer possible to delete the 'Blank' Template from the RHV manager. 
It is possible to change the name to 'Blank1' or to any other name. Edit the the template's description and comment.
Installation with blank template called 'Blank1' is successful now. 

Verified on - 4.11.0-0.nightly-2022-06-22-235234 and rhvm-4.5.1.2-0.11.el8ev.noarch

Comment 25 errata-xmlrpc 2022-08-10 10:35:34 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 (Important: OpenShift Container Platform 4.11.0 bug fix and security update), 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/RHSA-2022:5069


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