Bug 2015837
Summary: | OS_CLOUD overwrites install-config's platform.openstack.cloud | ||
---|---|---|---|
Product: | OpenShift Container Platform | Reporter: | Michał Dulko <mdulko> |
Component: | Installer | Assignee: | Pierre Prinetti <pprinett> |
Installer sub component: | OpenShift on OpenStack | QA Contact: | Itzik Brown <itbrown> |
Status: | CLOSED ERRATA | Docs Contact: | |
Severity: | low | ||
Priority: | medium | CC: | aos-bugs, itbrown, pprinett |
Version: | 4.10 | Keywords: | Triaged |
Target Milestone: | --- | ||
Target Release: | 4.10.0 | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: |
Cause: OpenStack environment variables take precedence over arguments when invoking Terraform
Consequence: the value of the environment variable OS_CLOUD would override what is set in the install-config property `platform.openstack.cloud` when executing `openshift-install create cluster`
Fix: the Installer now overwrites the environment variable OS_CLOUD for its children processes
Result: OpenStack-related environment variables should not influence any more how the Installer operates on the OpenStack infrastructure.
|
Story Points: | --- |
Clone Of: | Environment: | ||
Last Closed: | 2022-03-10 16:21:06 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
Michał Dulko
2021-10-20 08:54:43 UTC
Related: Bug 1876815 Bug 1813949 My understanding of the story: INITIAL STATE: the configuration for the whole Installer (Go code + Terraform) is overridden by OS_* environment variables. --> Bug 1876815 is fixed by unsetting OS_CLOUD each time a client is generated STATE 1: both Gophercloud and Terraform ignore the OS_CLOUD env var, but other OS_* environment variables are obeyed --> Bug 1813949 is fixed by setting an env var prefix in Gophercloud. All OS_* variables are now ignored when generating a Gophercloud service client in the Installer. This patch reverts the previous patch: unsetenv(OS_CLOUD) is removed. STATE 2: All OS_* environment variables are ignored when generating a Gophercloud service client from within the Installer. Terraform is behaviour is brought back to that of the Initial state. --- Open question: why is Terraform letting an OS_CLOUD environment variable taking precedence over the value that the Installer passes? I believe this is a low/medium. We will prioritise accordingly. For the record, these environment variables did not pose problem in my tests: OS_USERNAME OS_PASSWORD OS_PROJECT_NAME OS_AUTH_URL OS_TENANT_ID OS_REGION_NAME The proposed fix is then only focusing on OS_CLOUD. Removing the Triaged keyword because: * the QE automation assessment (flag qe_test_coverage) is missing Verified using the following steps: 1. Unset OS_CLOUD and OS_CLOUDNAME 2. Set OS_CLOUD to foo (Which doesn't exist) 3. Set platform.openstack.cloud to 'shiftstack' in install-config.yaml Version: OCP 4.10.0-0.nightly-2021-11-27-004934 RHOS-16.1-RHEL-8-20210903.n.0 set qe_test_coverage to "-" because testing the Installer's Terraform response to install-config properties is very expensive and I don't think that this particular bug is worth it. 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.10.3 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:0056 |