When running the installer with an install config that contains a network name but no VNic profile, and on the oVirt side there is more then one VNIC profile attached to the network then the installer will fail with error on missing tfvars. The missing tfvars are all the oVirt specific vars and the tfvarts.json file is never written. Example of the error: ``` .... ERROR Error: No value for required variable ERROR ERROR on ../../../openshift-install-948796804/variables-ovirt.tf line 111: ERROR 111: variable "ovirt_master_affinity_groups" { ERROR ERROR The root module input variable "ovirt_master_affinity_groups" is not set, and ERROR has no default value. Use a -var or -var-file command line argument to provide ERROR a value for this variable. ERROR ERROR Failed to read tfstate: open /tmp/openshift-install-948796804/terraform.tfstate: no such file or directory FATAL failed to fetch Cluster: failed to generate asset "Cluster": failed to create cluster: failed to apply Terraform: failed to complete the change ``` When looking into the code we do check that and should return a good error message[1], but since this is a custom error and the err var is actually nil then we return with nil which causes the installation to continue and fail when it can't start terraform. How to test: Try to install openshift on oVirt with a network that has 2 VNICs attached and expect to get a clear error message: "failed to compute values for Engine platform, there are multiple vNIC profiles. found 2 vNIC profiles for network _______" [1] https://github.com/openshift/installer/blob/master/pkg/asset/cluster/tfvars.go#L534
Verified on - openshift-install-linux-4.9.0-0.nightly-2021-07-17-212317 with rhvm-4.4.7.6-0.11.el8ev.noarch The installer fails now with more meaningful error message to the user: "DEBUG Generating Terraform Variables... FATAL failed to fetch Terraform Variables: failed to generate asset "Terraform Variables": failed to compute values for Engine platform, there are multiple vNIC profiles. found 2 vNIC profiles for network ovirtmgmt "
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 (Moderate: OpenShift Container Platform 4.9.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-2021:3759