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

Bug 1823725

Summary: failed to deploy ocp cluster on rhv
Product: OpenShift Container Platform Reporter: sergey.smirnov <sergey.smirnov>
Component: InstallerAssignee: Douglas Schilling Landgraf <dougsland>
Installer sub component: OpenShift on RHV QA Contact: Lucie Leistnerova <lleistne>
Status: CLOSED DUPLICATE Docs Contact:
Severity: high    
Priority: high CC: dougsland, hpopal, michal.skrivanek, sergey.smirnov
Version: 4.4   
Target Milestone: ---   
Target Release: 4.6.0   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-06-05 14:43:17 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:
Attachments:
Description Flags
openshift install
none
openshift install updated rhv
none
openshift install latest installer and exported vars
none
installer console output screenshot
none
console output with exported OPENSHIFT_INSTALL_OS_IMAGE_OVERRIDE
none
RHV ocp-vmtemplate present
none
RHV Blank template present
none
ovirtmgmt network and vnic profile none

Description sergey.smirnov@ru.ibm.com 2020-04-14 11:01:48 UTC
Created attachment 1678667 [details]
openshift install

Description of problem:

Version-Release number of the following components:
./openshift-install 4.4.0-0.nightly-2020-04-09-220855
built from commit f482bafd913a3f913e250459f8b4068907610611
release image quay.io/openshift-release-dev/ocp-release-nightly@sha256:83b6d60b084b536231d5b36a21e5ba11155ee8f555b58f1b26d3b8327842f896

RHV 4.3.7.2-0.1.el7

How reproducible:
always

Steps to Reproduce:
run installer 

sudo ./openshift-install create cluster

Actual results:
install failed with errors: 

DEBUG module.template.data.ovirt_vnic_profiles.vnic_profiles: Refreshing state...
ERROR
ERROR Error: your query returned no results, please change your search criteria and try again
ERROR
ERROR   on ../../../tmp/openshift-install-423894110/template/main.tf line 11, in data "ovirt_templates" "osImage":
ERROR   11: data "ovirt_templates" "osImage" {
ERROR
ERROR
ERROR Failed to read tfstate: open /tmp/openshift-install-423894110/terraform.tfstate: no such file or directory
FATAL failed to fetch Cluster: failed to generate asset "Cluster": failed to create cluster: failed to apply using Terraform



Expected results:
deployed OCP cluster

Additional info:
OCP install log in attachment

Comment 1 Michal Skrivanek 2020-04-14 13:25:21 UTC
can you please try with recent RHV? that would be 4.3.9

Comment 2 sergey.smirnov@ru.ibm.com 2020-04-14 20:41:25 UTC
updated to 4.3.9.4-11

same errors 

...
*********************************************************************************************************************************************************
INFO Obtaining RHCOS image file from 'https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.4/44.81.202003110027-0/x86_64/rhcos-44.81.202003110027-0-openstack.x86_64.qcow2.gz?sha256=237b9e0af475bf318abbe8d83d5508c2c3d4cca96fdcdb16edace2cc062216d1'
INFO The file was found in cache: /root/.cache/openshift-installer/image_cache/2158211434d46c0485882ed39e0ddc97. Reusing...
INFO Creating infrastructure resources...
ERROR
ERROR Error: your query returned no results, please change your search criteria and try again
ERROR
ERROR   on ../../../tmp/openshift-install-416841568/template/main.tf line 11, in data "ovirt_templates" "osImage":
ERROR   11: data "ovirt_templates" "osImage" {
ERROR
ERROR
ERROR Failed to read tfstate: open /tmp/openshift-install-416841568/terraform.tfstate: no such file or directory
FATAL failed to fetch Cluster: failed to generate asset "Cluster": failed to create cluster: failed to apply using Terraform

Comment 3 sergey.smirnov@ru.ibm.com 2020-04-14 20:43:04 UTC
Created attachment 1678807 [details]
openshift install updated rhv

Comment 4 Michal Skrivanek 2020-04-15 06:25:05 UTC
pending investigation.
could be something simple like invalid/incomplete configuration

Comment 5 sergey.smirnov@ru.ibm.com 2020-04-20 11:06:42 UTC
update:

followed with updated guide v1.5 tried to perform installation within latest installer 4.4.0-0.nightly-2020-04-18-095545
and additional step from guide - "create custom virtual machine template for the installer" (upload RHCOS image to RHV -> create VM template and attach RHCOS image to this template -> export env vars)

errors are same as from previous attempts - 

# ./openshift-install create cluster
INFO Creating infrastructure resources...
ERROR
ERROR Error: your query returned no results, please change your search criteria and try again
ERROR
ERROR   on ../../tmp/openshift-install-623025547/template/main.tf line 11, in data "ovirt_templates" "osImage":
ERROR   11: data "ovirt_templates" "osImage" {
ERROR
ERROR
ERROR Failed to read tfstate: open /tmp/openshift-install-623025547/terraform.tfstate: no such file or directory
FATAL failed to fetch Cluster: failed to generate asset "Cluster": failed to create cluster: failed to apply using Terraform

Comment 6 sergey.smirnov@ru.ibm.com 2020-04-20 11:10:25 UTC
Created attachment 1680252 [details]
openshift install latest installer and exported vars

Comment 7 sergey.smirnov@ru.ibm.com 2020-04-20 11:11:11 UTC
Created attachment 1680253 [details]
installer console output screenshot

Comment 8 Roy Golan 2020-04-20 14:29:45 UTC
It looks like terraform wasn't able to find (using an API search) the template you created.
- make sure you exported the template name with OPENSHIFT_INSTALL_OS_IMAGE_OVERRIDE=<template name>

If that is set correctly then try RHV Manager UI, go to templates, and use this search string "name=<template name> or name=Blank"

This should at least return a single result. If not then this is our problem. And that means you renamed the 'Blank' template?

Comment 9 sergey.smirnov@ru.ibm.com 2020-04-20 15:05:58 UTC
thanks Roy, checked and please take a look at the screenshots attached.
What do you mean renamed Blank template? Blank template still exist.

Comment 10 sergey.smirnov@ru.ibm.com 2020-04-20 15:07:03 UTC
Created attachment 1680308 [details]
console output with exported OPENSHIFT_INSTALL_OS_IMAGE_OVERRIDE

Comment 11 sergey.smirnov@ru.ibm.com 2020-04-20 15:07:27 UTC
Created attachment 1680309 [details]
RHV ocp-vmtemplate present

Comment 12 sergey.smirnov@ru.ibm.com 2020-04-20 15:08:02 UTC
Created attachment 1680310 [details]
RHV Blank template present

Comment 13 sergey.smirnov@ru.ibm.com 2020-04-20 20:27:32 UTC
update:

tried to clean all data from previous install attempt, rebuild VM template and re-run installer, new errors appears: 

# ./openshift-install create cluster
WARNING Found override for OS Image. Please be warned, this is not advised
INFO Consuming Install Config from target directory
INFO Creating infrastructure resources...
ERROR
ERROR Error: Invalid index
ERROR
ERROR   on ../../tmp/openshift-install-834622489/template/main.tf line 37, in locals:
ERROR   37:   network_id = [for n in local.cluster.networks : n.id if n.name == var.ovirt_network_name][0]
ERROR     |----------------
ERROR     | local.cluster.networks is empty list of object
ERROR     | var.ovirt_network_name is "ovirtmgmt"
ERROR
ERROR The given key does not identify an element in this collection value.
ERROR
ERROR Failed to read tfstate: open /tmp/openshift-install-834622489/terraform.tfstate: no such file or directory
FATAL failed to fetch Cluster: failed to generate asset "Cluster": failed to create cluster: failed to apply using Terraform

ovirtmgmt exist in RHV.

similar issue here 
https://github.com/openshift/installer/pull/3406

Comment 14 Roy Golan 2020-04-20 20:30:36 UTC
Can you verify you have a Vnic profile with the name "ovirtmgmt" ?  The PR you mention will solve that.

Comment 15 sergey.smirnov@ru.ibm.com 2020-04-20 20:35:50 UTC
Created attachment 1680365 [details]
ovirtmgmt network and vnic profile

Comment 16 sergey.smirnov@ru.ibm.com 2020-04-20 20:38:07 UTC
Yes I've checked this - vnic profile and network both looks okay

Comment 17 Roy Golan 2020-04-20 20:39:22 UTC
Are you looking at the right ovirt cluster?

Comment 18 sergey.smirnov@ru.ibm.com 2020-04-20 20:57:44 UTC
Yes, "ovirtmgmt" network present to all clusters in our configuration.

Comment 19 sergey.smirnov@ru.ibm.com 2020-04-29 09:31:52 UTC
any updates on this?

Comment 20 Roy Golan 2020-05-28 10:21:37 UTC
https://bugzilla.redhat.com/show_bug.cgi?id=1816714 changed the handling there and will solve this. Please use is it and let us know.

Comment 23 Douglas Schilling Landgraf 2020-06-05 14:43:17 UTC
As there is no feedback from Sergey yet and I belive this bug is a DUP of bz#1816714 I am closing it now. Fell free to re-open in case need any assistance.

*** This bug has been marked as a duplicate of bug 1816714 ***

Comment 24 Red Hat Bugzilla 2023-09-14 05:55:27 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days