Failed to provision volume with StorageClass "<sc>" : rpc error: code = unknown storage class: <sc>
Applies to
Trident
OpenShift containter platform (OCP)
Issue
Trident volume provisioning fails with error: Failed to provision volume with StorageClass "<sc>" : rpc error: code = unknown storage class: <sc>
PVC provisioning gets stuck with 'Pending' status.
Describing the pvc shows the error:

StorageClass delete and recreate are successful but trident keeps showing the error.
If we create a storageclass with different name, provisioning works with that.
Problematic StorageClass will not show in the output of the command ./tridentctl get sc but will show in the output of the command oc get sc
Trident controller log would show the problematic StorageClass as being deleted:
time="Z" level=debug msg="Added CR event to workqueue." crdControllerEvent=add event=add key=trident/trident-san-nas kind=TridentBackendConfig logLayer=crd_frontend logSource=trident-crd-controller requestID=2fda286c-a80e-472f-ab4f-41debae4e1eb requestSource=CRD workflow="cr=reconcile"I warnings.go:110] "Warning: metadata.finalizers: \"trident.netapp.io\": prefer a domain-qualified finalizer name including a path (/) to avoid accidental conflicts with other finalizer writers"time="Z" level=warning msg="K8S helper could not add a storage class." error="object is being deleted: tridentstorageclasses.trident.netapp.io \"<sc>\" already exists" logLayer=csi_frontend name=sc parameters="map[backendType:ontap-nas]" provisioner=csi.trident.netapp.io requestID=c6004fa1-ba28-40a4-9474-da9bd0836d78 requestSource=Kubernetes workflow="storage_class=create"
