Bug 1890501 - [OCP 4.5][vsphere IPI] folder not found if datacenter is inside a folder
Summary: [OCP 4.5][vsphere IPI] folder not found if datacenter is inside a folder
Keywords:
Status: CLOSED DUPLICATE of bug 1882022
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 4.5
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
: ---
Assignee: aos-install
QA Contact: Gaoyun Pei
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-10-22 12:03 UTC by Mario Abajo
Modified: 2022-02-03 01:38 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-10-22 17:37:11 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
openshift_install.log (71.83 KB, text/plain)
2020-10-22 12:03 UTC, Mario Abajo
no flags Details

Description Mario Abajo 2020-10-22 12:03:45 UTC
Created attachment 1723499 [details]
openshift_install.log

Created attachment 1723499 [details]
openshift_install.log

Thanks for opening a bug report!
Before hitting the button, please fill in as much of the template below as you can.
If you leave out information, it's harder to help you.
Be ready for follow-up questions, and please respond in a timely manner.
If we can't reproduce a bug we might close your issue.
If we're wrong, PLEASE feel free to reopen it and explain why.

Version:

$ openshift-install version
bin/openshift-install 4.5.14
built from commit 9893a482f310ee72089872f1a4caea3dbec34f28
release image quay.io/openshift-release-dev/ocp-release@sha256:95cfe9273aecb9a0070176210477491c347f8e69e41759063642edf8bb8aceb6


Platform:

vsphere 6.7

Please specify:
IPI

What happened?

If the datacenter object in vsphere is inside a folder like in this example:

* Vcenter
  \_ Folder
    \_ Datacenter
      \_ Cluster
       ...

Instead of the clasic hierarchy:

* Vcenter
  \_ Datacenter
    \_ Cluster
     ...

Then the terraform fails with this error:

FATAL failed to fetch Cluster: failed to fetch dependency of "Cluster": failed to generate asset "Platform Provisioning Check": platform.vsphere.folder: Invalid value: "/DATACENTER/vm/Openshift": folder '/DATACENTER/vm/Openshift' not found

Looks like the prefix path used to access folders doesn't take into account this situation.

I will attach a .openshift-install.log file from a test cluster


What did you expect to happen?

Installation success no matter the hierarchy is in vsphere


How to reproduce it (as minimally and precisely as possible)?

It is easy to reproduce just by moving the datacenter in vsphere under a folder and trying to launch an ipi install


Anything else we need to know?

One way to overcome this is explained in the KCS: https://access.redhat.com/solutions/5507161
- First generate the installation file:
$ openshift-install create install-config --dir=DIRECTORY

- Then modify the "datacenter" label on install-config.yaml from this:
    datacenter: DATACENTER_NAME
  to this:
    datacenter: FOLDER_NAME/DATACENTER_NAME

I have not tested yet if this can have further implications

Comment 1 Mario Abajo 2020-10-22 12:07:13 UTC
Full error message:
~~~
INFO Creating infrastructure resources...         
ERROR                                              
ERROR Error: failed to find provided vSphere objects: folder '/DATACENTER/vm/xxxxxx-lfgv8' not found 
ERROR                                              
ERROR   on ../../../tmp/openshift-install-222423625/main.tf line 43, in resource "vsphereprivate_import_ova" "import": 
ERROR   43: resource "vsphereprivate_import_ova" "import" { 
ERROR                                              
ERROR                                              
FATAL failed to fetch Cluster: failed to generate asset "Cluster": failed to create cluster: failed to apply Terraform: failed to complete the change 
~~~

Comment 2 Abhinav Dahiya 2020-10-22 17:37:11 UTC

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


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