Bug 2078431

Summary: [OCPonRHV] - ERROR failed to instantiate provider "openshift/local/ovirt" to obtain schema: ERROR fork/exec
Product: OpenShift Container Platform Reporter: michal <mgold>
Component: InstallerAssignee: Patrick Dillon <padillon>
Installer sub component: openshift-installer QA Contact: michal <mgold>
Status: CLOSED ERRATA Docs Contact:
Severity: urgent    
Priority: urgent CC: lleistne, mburman, padillon
Version: 4.11   
Target Milestone: ---   
Target Release: 4.11.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: 2022-08-10 11:08:16 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 michal 2022-04-25 09:52:24 UTC
steps:
1) install ocp on rhv - build openshift-install-linux-4.11.0-0.nightly-2022-04-24-085400. this build supoose to include fix for - 
https://github.com/openshift/installer/pull/5825
Unpack to install dir #5825
2) look on installtion process
actual:
got this error 
ERROR failed to instantiate provider "openshift/local/ovirt" to obtain schema: 
ERROR fork/exec                                    
ERROR .terraform/providers/openshift/local/ovirt/1.0.0/linux_amd64/terraform-provider-ovirt: 
ERROR permission denied

it seems that the build doesn't contain the fix for this bug

Comment 2 Patrick Dillon 2022-04-29 13:30:43 UTC
With my current understanding of this bug, in that this requires removing noexec from /tmp, I am bumping priority/severity to urgent as this blocks RHV folks. Setting blocker+ as well.

Comment 3 Patrick Dillon 2022-05-03 00:21:05 UTC
After taking a closer look at this, it looks like the error is coming from the ovirt provider, so I am transferring this to the ovirt component. If I am mistaken or we need a fix in the main installer codebase, please feel free to send it back.

From Slack, the posted error is:

"failed to fetch Cluster: failed to generate asset \\\"Cluster\\\": failure applying terraform for \\\"image\\\" stage: failed to create cluster: failed to apply Terraform: \\nError: Could not load plugin\\

"failed to apply Terraform" error occurs here: https://github.com/openshift/installer/blob/master/pkg/terraform/terraform.go#L57

This is after Terraform has already been unpacked and initialized here: https://github.com/openshift/installer/blob/master/pkg/terraform/terraform.go#L48 

It would be great to have --log-level debug output or .openshift_install.log to determine whether Terraform was being successfully executed prior to the error. 

The error in the BZ "failed to instantiate provider "openshift/local/ovirt" to obtain schema:" comes from the terraform-plugin-sdk: https://github.com/openshift/installer/blob/master/terraform/providers/ovirt/vendor/github.com/hashicorp/terraform-plugin-sdk/terraform/schemas.go#L107

Comment 4 Patrick Dillon 2022-05-04 00:00:51 UTC
I am moving this back to Installer (but keeping oVirt QE contact Michael Burman on the ticket) in order to see if my PR to update the TF_DATA_DIR can fix this problem.

Comment 5 Patrick Dillon 2022-05-06 13:24:55 UTC
Can we get logs for this? We need at least .openshift_install.log, but any other complete logs you can provide would be helpful.

Comment 9 Michael Burman 2022-05-30 11:15:31 UTC
Verified on - 4.11.0-0.nightly-2022-05-25-193227

Comment 11 errata-xmlrpc 2022-08-10 11:08:16 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