Bug 1955697 - [vsphere] If there are multiple datacenters with the same name installation fails
Summary: [vsphere] If there are multiple datacenters with the same name installation f...
Keywords:
Status: NEW
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 4.8
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: aos-install
QA Contact: jima
URL:
Whiteboard:
Depends On: 1981941
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-04-30 16:54 UTC by Jeremiah Stuever
Modified: 2022-04-23 04:36 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of: 1918005
Environment:
Last Closed:
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift installer pull 4894 0 None open Bug 1955697: tfvars/vsphere: use explicit path for datacenter. 2021-04-30 17:02:54 UTC
Github openshift installer pull 4978 0 None open Bug 1955697: Revert "tfvars/vsphere: use explicit path for datacenter." 2021-06-07 21:37:59 UTC

Comment 2 jima 2021-05-20 02:36:03 UTC
Use Jeremiah's embedded vsphere env on VMC to verify the bug since QE don't have such env.

There are two datacenters under different folder in this embedded vsphere env:
SDDC-Datacenter
foo/SDDC-Datacenter

Reproduced the issue on nightly build 4.8.0-0.nightly-2021-05-17-075254:
In install-config.yaml:
platform:
  vsphere:
    apiVIP: 192.168.1.2
    cluster: bar/Cluster-1
    datacenter: SDDC-Datacenter
    defaultDatastore: WorkloadDatastore
    ingressVIP: 192.168.1.3
    network: internal

Error reported when running command "openhsift-install create cluster --dir ipi":

ERROR                                              
ERROR Error: error fetching datacenter: path 'SDDC-Datacenter' resolves to multiple datacenters 
ERROR                                              
ERROR   on ../../../../tmp/openshift-install-308467941/main.tf line 20, in data "vsphere_datacenter" "datacenter": 
ERROR   20: data "vsphere_datacenter" "datacenter" { 


Verified on nightly build 4.8.0-0.nightly-2021-05-18-205323 with fix, use same install-config yaml file to create cluster, not hit above error any more, but worker nodes are unable to be created with same error in MAC pod log:

E0520 02:25:10.494534       1 controller.go:281] jstuevervcsa-v8fbg-master-0: failed to check if machine exists: jstuevervcsa-v8fbg-master-0: failed to create scope for machine: failed to create vSphere session: unable to find datacenter "SDDC-Datacenter": path 'SDDC-Datacenter' resolves to multiple datacenters
E0520 02:25:10.528348       1 controller.go:302] controller-runtime/manager/controller/machine_controller "msg"="Reconciler error" "error"="jstuevervcsa-v8fbg-master-0: failed to create scope for machine: failed to create vSphere session: unable to find datacenter \"SDDC-Datacenter\": path 'SDDC-Datacenter' resolves to multiple datacenters" "name"="jstuevervcsa-v8fbg-master-0" "namespace"="openshift-machine-api" 
I0520 02:25:10.528435       1 controller.go:174] jstuevervcsa-v8fbg-master-1: reconciling Machine 

cluster is still there and not destroyed, you can access to check.

Comment 4 Jeremiah Stuever 2021-08-02 16:54:11 UTC
If I recall, we paused on this bug because there isn't currently a combination that works for this value between the vsphere-private Terraform provider and the in-cluster cloud controller. We were discussing upgrading the community Terraform VSphere provider to a newer version which will obsolete the vsphere-private code. However, that change is blocked by the work to split terraform templates into stages to enable us to upgrade to newer versions.

https://issues.redhat.com/browse/CORS-1696

Comment 5 Russell Teague 2021-08-24 17:32:11 UTC
Waiting on terraform upgrade.


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