Bug 1836042 - [vsphere] folder in cloud-provider-config should be set as absolute path when customizing folder in install-config.yaml
Summary: [vsphere] folder in cloud-provider-config should be set as absolute path when...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 4.5
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.5.0
Assignee: Patrick Dillon
QA Contact: jima
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-05-15 02:19 UTC by jima
Modified: 2020-07-15 12:06 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: the folder value in the cloud-provider-config manifest was set to the relative path Consequence: when a cluster was installed to a nested subfolder, volume provisioning would fail with "folder not found" Fix: change the folder in the cloud provider config to the absolute path Result: volumes can be successfully provisioned
Clone Of:
Environment:
Last Closed: 2020-07-13 17:39:12 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift installer pull 3612 0 None closed Bug 1836042: set folder absolute path in vSphere cloud provider 2021-02-15 05:24:26 UTC
Red Hat Product Errata RHBA-2020:2409 0 None None None 2020-07-13 17:39:24 UTC

Description jima 2020-05-15 02:19:49 UTC
Description of problem:
After set "folder" option with one existing absolute path(which has already been created on vsphere server) in install-config and launch installation,"folder" in cloud-provider-config is set as relative path, it will let pvc creation failed with error of "Failed to provision volume with StorageClass "thin": folder 'jima/jima-upi' not found"

In install-config.yaml:
...
platform:
  vsphere:
    datacenter: dc1
    network: VM Network
    defaultDatastore: 10TB-GOLD
    password: 'xxxxxx'
    username: Administrator@e2e.local
    vCenter: vcsa2-qe.vmware.devcluster.openshift.com
    folder: /dc1/vm/jima/jima-upi
    cluster: devel
...

In cloud-provider-config:
# ../oc describe cm cloud-provider-config -n openshift-config
Name:         cloud-provider-config
Namespace:    openshift-config
Labels:       <none>
Annotations:  <none>
Data
====
config:
----
[Global]
secret-name = "vsphere-creds"
secret-namespace = "kube-system"
insecure-flag = "1"
[Workspace]
server = "vcsa-qe.vmware.devcluster.openshift.com"
datacenter = "dc1"
default-datastore = "nvme-ds1"
folder = "jima/jima-upi"
[VirtualCenter "vcsa-qe.vmware.devcluster.openshift.com"]
datacenters = "dc1"

When trying to create pvc, error is reported:
# oc describe pvc mypvc01
Name:          mypvc01
Namespace:     default
StorageClass:  thin
Status:        Pending
Volume:        
Labels:        <none>
Annotations:   volume.beta.kubernetes.io/storage-provisioner=kubernetes.io/vsphere-volume
Finalizers:    [kubernetes.io/pvc-protection]
Capacity:      
Access Modes:  
VolumeMode:    Filesystem
Events:
  Type     Reason              Age                            From                         Message
  ----     ------              ----                           ----                         -------
  Warning  ProvisioningFailed  <invalid> (x3 over <invalid>)  persistentvolume-controller  Failed to provision volume with StorageClass "thin": folder 'jima/jima-upi' not found


Version-Release number of the following components:
rpm -q openshift-ansible
rpm -q ansible
ansible --version

How reproducible:
Always

Steps to Reproduce:
1. Set "folder" in install-config.yaml with existing absolute path
2. install cluster
3. 

Actual results:
folder in cloud-provider-config is relative path

Expected results:
folder in cloud-provider-config should be set as absolute path

Additional info:

Comment 3 jima 2020-05-25 02:59:01 UTC
Issues has been verified with 4.5 nightly build: 4.5.0-0.nightly-2020-05-23-193013 on both upi and ipi installation.

folder in cm cloud-provider-config is set to absolute path.

$ oc describe cm cloud-provider-config -n openshift-config
Name:         cloud-provider-config
Namespace:    openshift-config
Labels:       <none>
Annotations:  <none>

Data
====
config:
----
[Global]
secret-name = "vsphere-creds"
secret-namespace = "kube-system"
insecure-flag = "1"

[Workspace]
server = "vcsa-qe.vmware.devcluster.openshift.com"
datacenter = "dc1"
default-datastore = "nvme-ds1"
folder = "/dc1/vm/test/jimaupi"

[VirtualCenter "vcsa-qe.vmware.devcluster.openshift.com"]
datacenters = "dc1"

Events:  <none>

Comment 4 krapohl 2020-06-03 19:11:22 UTC
Is there a fix going to be implemented that allows the folder value to not be absolute? This is the way it worked previously?

If it must from now on always be the absolute path then there is a fix needed to be put in the code that translates what is put in the install-config.yaml that automatically generates the cloud-provider-config data so it generates the absolute path for the folder parm.

Comment 5 errata-xmlrpc 2020-07-13 17:39:12 UTC
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

Comment 6 Patrick Dillon 2020-07-15 12:06:42 UTC
> Is there a fix going to be implemented that allows the folder value to not be absolute? This is the way it worked previously?

It didn't really work previously, hence this bug... I think it would help me answer your questions if I understood the concern. Is this causing an issue? breaking some sort of workflow?

> If it must from now on always be the absolute path then there is a fix needed to be put in the code that translates what is put in the install-config.yaml that automatically generates the cloud-provider-config data so it generates the absolute path for the folder parm.

This commit shows the approach for validating folder path in the install config:

https://github.com/openshift/installer/commit/e93985366d224d023574e0359833c44162a2bdb5#diff-9cc79a09db6f5387dec9d985adf489f3R80-R95


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