Bug 1766145 - openshift-install create cluster --dir : Failed to read terraform.tfstate: no such file or directory
Summary: openshift-install create cluster --dir : Failed to read terraform.tfstate: no...
Keywords:
Status: CLOSED DUPLICATE of bug 1767066
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 4.2.0
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: ---
: 4.4.0
Assignee: Abhinav Dahiya
QA Contact: Johnny Liu
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-10-28 12:20 UTC by Noam Manos
Modified: 2020-01-31 18:45 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-01-31 18:45:20 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
My Ocp installer config directory (1.04 MB, application/zip)
2019-10-28 12:23 UTC, Noam Manos
no flags Details

Description Noam Manos 2019-10-28 12:20:10 UTC
Description of problem:

$ ./openshift-install create install-config --dir my-cluster-config
...
$ ./openshift-install create cluster --dir my-cluster-config
INFO Consuming "Install Config" from target directory 
...                                            
ERROR Failed to read tfstate: open /tmp/openshift-install-026908720/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 the following components:
openshift-install-linux-4.2.0

How reproducible:
Always on my system

Steps to Reproduce:
Extract openshift-install-linux-4.2.0

./openshift-install create cluster --dir my-cluster-config
./openshift-install create install-config --dir my-cluster-config


Actual results:

INFO Consuming "Install Config" from target directory 
INFO Creating infrastructure resources...         
ERROR                                              
ERROR Error: Argument or block definition required 
ERROR                                              
ERROR   on terraform.aws.auto.tfvars line 1:       
ERROR    1: {                                      
ERROR                                              
ERROR An argument or block definition is required here. 
ERROR                                              
ERROR                                              
ERROR Error: Argument or block definition required 
ERROR                                              
ERROR   on terraform.tfvars line 1:                
ERROR    1: {                                      
ERROR                                              
ERROR An argument or block definition is required here. 
ERROR                                              
ERROR Failed to read tfstate: open /tmp/openshift-install-026908720/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:
Install with no error

Additional info:
If entering directory, and running without --dir, installation passes:

$ cd my-cluster-config/
[nmanos@nmanos nmanos-cluster-a]$ ll
total 319
drwxr-xr-x 2 nmanos nmanos   1024 Oct 28 13:00 auth
-rw-r--r-- 1 nmanos nmanos    283 Oct 28 13:00 metadata.json
-rw-r--r-- 1 nmanos nmanos    602 Oct 28 13:00 terraform.aws.auto.tfvars.json
-rw-r--r-- 1 nmanos nmanos 322549 Oct 28 13:00 terraform.tfvars.json
drwxr-xr-x 2 nmanos nmanos   1024 Oct 28 13:00 tls

[nmanos@nmanos my-cluster-config]$ ../openshift-install create cluster
INFO Creating infrastructure resources...         
INFO Waiting up to 30m0s for the Kubernetes API at https://api.nmanos-cluster-a.devcluster.openshift.com:6443... 
INFO API v1.14.6+2e5ed54 up                       
INFO Waiting up to 30m0s for bootstrapping to complete... 
INFO Destroying the bootstrap resources...        
INFO Waiting up to 30m0s for the cluster at https://api.nmanos-cluster-a.devcluster.openshift.com:6443 to initialize... 
INFO Waiting up to 10m0s for the openshift-console route to be created... 
INFO Install complete!                            
INFO To access the cluster as the system:admin user when using 'oc', run 'export KUBECONFIG=/home/nmanos/automation/ocp-install/my-cluster-config/auth/kubeconfig' 
INFO Access the OpenShift web-console here: https://console-openshift-console.apps.nmanos-cluster-a.devcluster.openshift.com 
INFO Login to the console with user: kubeadmin, password: hutZU-sZWur-hFwqh-eEMNK

Comment 1 Noam Manos 2019-10-28 12:23:03 UTC
Created attachment 1629751 [details]
My Ocp installer config directory

Comment 2 Scott Dodson 2019-11-05 18:40:26 UTC
This is believed to only occur when --dir is symlinked to another path, defer to 4.4.

Comment 3 Scott Dodson 2020-01-31 18:45:20 UTC

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


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