IBM Support

Creating Persistent Volume Claim Fails with Not Found in OpenShift

Troubleshooting


Problem

During creation of a persistent volume claim (PVC) for Red Hat OpenShift Container Platform (RHOCP) 4.6 or 4.7 on VSphere, thin storage is failing to create directories within the datastore. PODs, that rely on the storage, generate the following error: "Failed to provision volume with StorageClass (..) folder (..) not found".

Symptom

Any PVC creation attempt fails with the following error:
Generated from persistentvolume-controller 
Failed to provision volume with StorageClass "thin": folder '/{Datacenter}/vm/{Folder_name}' not found
Within the vsphere-problem-detector-operator POD logs, there are no issues with either the permissions of the vSphere user account, password, or the directories within the datastore.

Cause

The cloud-provider-config, which stores the config with the vCenter settings, no longer references the cluster name and now uses the infraID of the cluster as the folder name that is expected in vCenter.

Resolving The Problem

  1. Log in to the RED HAT® OPENSHIFT® cluster as an admin account, and obtain the infraID:
    oc get -o jsonpath='{.status.infrastructureName}{"\n"}' infrastructure cluster
  2. Log in to the VMware vCenter
  3. Click VMs and Templates view
  4. Right-click the datacenter where Red Hat OpenShift is installed
  5. Select New VM and Template Folder
  6. Create a folder with that infrastructure ID obtained from step 1
  7. Review the install-config.yaml, check the variable "folder:"
  8. Add "folder" parameter. For installer-provisioned infrastructure (IPI), the absolute path of an existing folder where the installation program creates the virtual machines. For example,
    folder: "/{datacenter_name}/vm/{folder_name}/{subfolder_name}".
    NOTE: If you do not provide this value, the installation program creates a top-level folder in the datacenter virtual machine folder that is named with the infrastructure ID.  If you are providing the infrastructure for the cluster (UPI), omit this parameter.

Document Location

Worldwide

[{"Type":"MASTER","Line of Business":{"code":"LOB24","label":"Security Software"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSTDPP","label":"IBM Cloud Pak for Security"},"ARM Category":[{"code":"a8m0z0000001h8uAAA","label":"Install"},{"code":"a8m0z0000001js1AAA","label":"Openshift"}],"ARM Case Number":"TS007706626","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"1.8.0"}]

Document Information

Modified date:
07 July 2022

UID

ibm16524898