Bug 1816714 - RHV - openshift-install errors out if vnic profile != vnic name
Summary: RHV - openshift-install errors out if vnic profile != vnic name
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 4.4
Hardware: Unspecified
OS: Linux
urgent
urgent
Target Milestone: ---
: 4.5.0
Assignee: Roy Golan
QA Contact: Jan Zmeskal
URL:
Whiteboard:
: 1823725 (view as bug list)
Depends On: 1830852
Blocks: 1820575
TreeView+ depends on / blocked
 
Reported: 2020-03-24 15:29 UTC by Jonathan Mainguy
Modified: 2023-10-06 19:29 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1820575 (view as bug list)
Environment:
Last Closed: 2020-08-04 18:06:52 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift installer issues 3266 0 None closed oVirt/RHV - openshift-install throws terraform error. 2020-11-24 09:47:32 UTC
Github openshift installer pull 3406 0 None closed Bug 1816714: ovirt - add vnic profile id to platform 2020-11-24 09:47:33 UTC
Red Hat Product Errata RHBA-2020:2409 0 None None None 2020-08-04 18:06:55 UTC

Description Jonathan Mainguy 2020-03-24 15:29:54 UTC
Description of problem:
Installer threw a terraform error.

openshift-install create install-config --dir=cluster-prod
? SSH Public Key <none>
? Platform ovirt
? Select the oVirt cluster LabRDU
? Select the oVirt storage domain rhev01a
? Select the oVirt network ocp1
? Enter the internal API Virtual IP 192.168.113.172
? Enter the internal DNS Virtual IP 192.168.113.173
? Enter the ingress IP  192.168.113.174
? Base Domain lab1.bwnet.us
? Cluster Name cluster44n
? The container registry pull secret for this cluster, as a single line of JSON (e.g. {"auths": {...}}).
 
You can get this secret from https://cloud.redhat.com/openshift/install/pull-secret
? Pull Secret ******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
 
[jmainguy@jmainguy bin]$ openshift-install create cluster --dir=cluster-prod
INFO Obtaining RHCOS image file from 'https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.4/44.81.202002241126-0/x86_64/rhcos-44.81.202002241126-0-openstack.x86_64.qcow2.gz?sha256=60e540f8c084c3e43507cb69521d3a64e44b3ea04c57515d53f9e4fbd986a3ff'
INFO The file was found in cache: /home/jmainguy/.cache/openshift-installer/image_cache/755b5c76ca03d2f02c873b7ef3f189b0. Reusing...
INFO Consuming Install Config from target directory
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-879371787/template/main.tf line 26, in data "ovirt_vnic_profiles" "vnic_profiles":
ERROR   26: data "ovirt_vnic_profiles" "vnic_profiles" {
ERROR                                              
ERROR                                              
ERROR Failed to read tfstate: open /tmp/openshift-install-879371787/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


Version-Release number of selected component (if applicable):
openshift-install v4.4.0
built from commit 153c8a35421b352010fc00987bc59a98e5c170cc
release image quay.io/openshift-release-dev/ocp-release-nightly@sha256:f3e4a746d0b44f27da9f3c87387eac59c612f15272977ea3f6b52e1fdb14e374


How reproducible:
100%

Steps to Reproduce:
1. In RHV, have vnic-profile != the vnic name
2. In the openshift-install binary, choose that vnic
3. Watch it bomb out

Actual results:
Errors out, see above

Expected results:
It creates a cluster on RHV

Additional info:
Github ticket with additional notes - https://github.com/openshift/installer/issues/3266

Comment 2 Marina Kalinin 2020-04-01 18:56:58 UTC
Changed severity to urgent, since it is blocking deployment and there is no workaround for my understanding.

Comment 4 Roy Golan 2020-04-03 14:38:39 UTC
For the record, there is a workaround, just to change the name of the profile to match the network name.

Comment 9 Stephen Cuppett 2020-04-14 11:31:46 UTC
Setting target release to current development version (4.5) for resolution. Where fixes (if any) are required/requested for prior versions, cloned BZs will be created when appropriate.

Comment 13 Roy Golan 2020-05-11 08:51:02 UTC
Some important validation that where added:

1. multiple vnic profile
  - run 'create install-config' and choose a network with multiple vnic profiles.
    the wizard will ask to select that specific profile.
 
  - run 'create cluster' with an install-config.yaml *without* vnicProfileID specified. If there is one, the
    installer would choose it. If there are multiple it will error and exit the install.


2. the vnic profile name doesn't matter, it is based on ID. validate 
   the vnic profile name is different than the network name.


3. specify a vnic profile in install-config.yaml which doesn't belong to the cluster, or wrong UUID

Comment 15 Jan Zmeskal 2020-05-11 09:05:07 UTC
Roy

> 3. specify a vnic profile in install-config.yaml which doesn't belong to the cluster, or wrong UUID

What is the expected outcome here? Do we expect the installer to expect with reasonable error message?

Comment 16 Roy Golan 2020-05-11 09:43:11 UTC
(In reply to Jan Zmeskal from comment #15)
> Roy
> 
> > 3. specify a vnic profile in install-config.yaml which doesn't belong to the cluster, or wrong UUID
> 
> What is the expected outcome here? Do we expect the installer to expect with
> reasonable error message?

exit with an error message.

Comment 17 Jan Zmeskal 2020-05-11 11:16:12 UTC
Verified with:
openshift-install-linux-4.5.0-0.nightly-2020-05-11-032504
rhvm-4.3.9.4-11.el7.noarch

Verification steps:
-> run 'create install-config' and choose a network with multiple vnic profiles. the wizard will ask to select that specific profile. DONE
-> run 'create cluster' with an install-config.yaml *without* vnicProfileID specified.
--> If there is one, the installer would choose it. DONE
--> If there are multiple it will error and exit the install. DONE (Although here it's far from obvious what went wrong. Roy, do we have any control over the format of terraform error messages? http://pastebin.test.redhat.com/863571)
-> the vnic profile name doesn't matter, it is based on ID. validate the vnic profile name is different than the network name. DONE (Verified by deploying OCP4.5 using network with name "ovirtmgmt" and network profile "testprofile")
-> specify a vnic profile in install-config.yaml which doesn't belong to the cluster, or wrong UUID. DONE (http://pastebin.test.redhat.com/863575)

-> I also verified that the help for VNIC Profile step in installation wizard works

Comment 19 Douglas Schilling Landgraf 2020-06-05 14:43:17 UTC
*** Bug 1823725 has been marked as a duplicate of this bug. ***

Comment 22 errata-xmlrpc 2020-08-04 18:06:52 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.5 image release 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-2020:2409


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