Bug 1767066
Summary: | Installation fails due to symlink install directory | ||
---|---|---|---|
Product: | OpenShift Container Platform | Reporter: | David Caldwell <dcaldwel> |
Component: | Installer | Assignee: | Patrick Dillon <padillon> |
Installer sub component: | openshift-installer | QA Contact: | Etienne Simard <esimard> |
Status: | CLOSED ERRATA | Docs Contact: | |
Severity: | medium | ||
Priority: | unspecified | CC: | aabhishe, adahiya, nmanos, padillon |
Version: | 4.2.z | ||
Target Milestone: | --- | ||
Target Release: | 4.5.0 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: |
Cause: terraform library does not check for symlinks when determining relative path to configuration file
Consequence: if installer is run from symlink the configuration is not found and installation fails
Fix: updated terraform to check for symlinks
Result: installer can now be run from a symlink dir
|
Story Points: | --- |
Clone Of: | Environment: | ||
Last Closed: | 2020-07-13 17:12:05 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
David Caldwell
2019-10-30 15:45:35 UTC
Customer removed the install directory and started again, here is the result: ``` { ~/Downloads/openshift }-> rm -rf /home/user/Downloads/openshift/mtn-azure { ~/Downloads/openshift }-> ./openshift-install create cluster --dir=/home/user/Downloads/openshift/mtn-azure ? SSH Public Key /home/user/.ssh/id_rsa.pub ? Platform azure ? Region ukwest ? Base Domain example.com ? Cluster Name test01 ? Pull Secret [? for help] ****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************** INFO Creating infrastructure resources... ERROR There are some problems with the configuration, described below. ERROR ERROR The Terraform configuration must be valid before initialization so that ERROR Terraform can determine which modules and providers need to be installed. ERROR ERROR Error: Failed to read module directory ERROR ERROR Module directory ../../../../tmp/openshift-install-845418638 does not exist or ERROR cannot be read. ERROR FATAL failed to fetch Cluster: failed to generate asset "Cluster": failed to create cluster: failed to initialize Terraform { ~/Downloads/openshift }-> ``` Is there any other info you want? This is happening because somewhere within the path /home/user/Downloads/openshift/mtn-azure there's a symlink. The workaround is to choose --dir that's not a symlink. https://bugzilla.redhat.com/show_bug.cgi?id=1767066#c4 provides the workaround *** Bug 1766145 has been marked as a duplicate of this bug. *** This is a bug in upstream TF: https://github.com/hashicorp/terraform/issues/24196 I have posted a PR to fix: https://github.com/hashicorp/terraform/pull/24197 We will see about carrying the patch locally. Confirmed that "Error: Failed to read module directory" is resolved and that we can install openshift with a symlink in `--dir` with: DEBUG OpenShift Installer 4.5.0-0.nightly-2020-03-10-155709 DEBUG Built from commit bdcf138e368e5323eff2eb78f3f9a7d8162123db ~~~ [quality@redhat 1767066_1786363_4.5]$ ln -s ../../../../../tmp/openshift-install-461871737 mtn-azure [quality@redhat 1767066_1786363_4.5]$ ls -al total 12 drwxrwxr-x 3 quality quality 4096 Mar 10 14:36 . drwxrwxr-x 6 quality quality 4096 Mar 10 14:34 .. drwxrwxr-x 2 quality quality 4096 Mar 10 14:28 4.5.0-0.nightly-2020-03-10-155709 lrwxrwxrwx 1 quality quality 46 Mar 10 14:36 mtn-azure -> ../../../../../tmp/openshift-install-461871737 lrwxrwxrwx 1 quality quality 33 Mar 10 14:15 payload -> 4.5.0-0.nightly-2020-03-10-155709 [quality@redhat 1767066_1786363_4.5]$ file /home/quality/TESTS/bugzilla/1767066_1786363_4.5/mtn-azure /home/quality/TESTS/bugzilla/1767066_1786363_4.5/mtn-azure: symbolic link to ../../../../../tmp/openshift-install-461871737 ~~~ ~~~ [quality@redhat 1767066_1786363_4.5]$ ./payload/openshift-install create cluster --dir=/home/quality/TESTS/bugzilla/1767066_1786363_4.5/mtn-azure --log-level debug ... ? SSH Public Key /home/quality/.ssh/id_rsa.pub ? Platform azure INFO Credentials loaded from file "/home/quality/.azure/osServicePrincipal.json" ? Region [Use arrows to move, enter to select, type to filter, ? for more help] ? Region switzerlandnorth ? Base Domain qe.redhat.openshift.com.com ? Cluster Name qeredhat ? Pull Secret [? for help] ********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************** INFO Creating infrastructure resources... DEBUG Symlinking plugin terraform-provider-vsphere src: "/home/quality/TESTS/bugzilla/1767066_1786363_4.5/4.5.0-0.nightly-2020-03-10-155709/openshift-install" dst: "/tmp/openshift-install-179109418/plugins/terraform-provider-vsphere" DEBUG Symlinking plugin terraform-provider-aws src: "/home/quality/TESTS/bugzilla/1767066_1786363_4.5/4.5.0-0.nightly-2020-03-10-155709/openshift-install" dst: "/tmp/openshift-install-179109418/plugins/terraform-provider-aws" DEBUG Symlinking plugin terraform-provider-azureprivatedns src: "/home/quality/TESTS/bugzilla/1767066_1786363_4.5/4.5.0-0.nightly-2020-03-10-155709/openshift-install" dst: "/tmp/openshift-install-179109418/plugins/terraform-provider-azureprivatedns" DEBUG Symlinking plugin terraform-provider-ignition src: "/home/quality/TESTS/bugzilla/1767066_1786363_4.5/4.5.0-0.nightly-2020-03-10-155709/openshift-install" dst: "/tmp/openshift-install-179109418/plugins/terraform-provider-ignition" DEBUG Symlinking plugin terraform-provider-local src: "/home/quality/TESTS/bugzilla/1767066_1786363_4.5/4.5.0-0.nightly-2020-03-10-155709/openshift-install" dst: "/tmp/openshift-install-179109418/plugins/terraform-provider-local" DEBUG Symlinking plugin terraform-provider-openstack src: "/home/quality/TESTS/bugzilla/1767066_1786363_4.5/4.5.0-0.nightly-2020-03-10-155709/openshift-install" dst: "/tmp/openshift-install-179109418/plugins/terraform-provider-openstack" DEBUG Symlinking plugin terraform-provider-azurerm src: "/home/quality/TESTS/bugzilla/1767066_1786363_4.5/4.5.0-0.nightly-2020-03-10-155709/openshift-install" dst: "/tmp/openshift-install-179109418/plugins/terraform-provider-azurerm" DEBUG Symlinking plugin terraform-provider-google src: "/home/quality/TESTS/bugzilla/1767066_1786363_4.5/4.5.0-0.nightly-2020-03-10-155709/openshift-install" dst: "/tmp/openshift-install-179109418/plugins/terraform-provider-google" DEBUG Symlinking plugin terraform-provider-ovirt src: "/home/quality/TESTS/bugzilla/1767066_1786363_4.5/4.5.0-0.nightly-2020-03-10-155709/openshift-install" dst: "/tmp/openshift-install-179109418/plugins/terraform-provider-ovirt" DEBUG Symlinking plugin terraform-provider-random src: "/home/quality/TESTS/bugzilla/1767066_1786363_4.5/4.5.0-0.nightly-2020-03-10-155709/openshift-install" dst: "/tmp/openshift-install-179109418/plugins/terraform-provider-random" DEBUG Initializing modules... DEBUG - bootstrap in ../../../../../tmp/openshift-install-179109418/bootstrap DEBUG - dns in ../../../../../tmp/openshift-install-179109418/dns DEBUG - master in ../../../../../tmp/openshift-install-179109418/master DEBUG - vnet in ../../../../../tmp/openshift-install-179109418/vnet DEBUG DEBUG Initializing the backend... DEBUG DEBUG Initializing provider plugins... DEBUG DEBUG Terraform has been successfully initialized! DEBUG DEBUG You may now begin working with Terraform. Try running "terraform plan" to see DEBUG any changes that are required for your infrastructure. All Terraform commands DEBUG should now work. ... ~~~ 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, 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 |