Why is the status of my OpenShift Data Foundation storage cluster stuck at Failed to reconcile
.
Virtual Private Cloud Classic infrastructure
ODF device set creation fails due to PVC names exceeding the Kubernetes character limit
When you create your ODF storage cluster and you run oc describe storagecluster <storage-cluster-name>
, you see an error similar to the following.
ceph-cluster-controller: failed to reconcile. failed to reconcile cluster "ocs-storagecluster-cephcluster": failed to configure local ceph cluster: failed to create cluster: failed to start ceph osds: 3 failures encountered while running osds in namespace openshift-storage: failed to create "provision" job for node "ocs-deviceset-ibmc-vpc-block-metro-retain-10iops-tier-0-datnv6k". Job.batch "rook-ceph-osd-prepare-aaa000aaa111a1a0e10ba1a11aa1a119" is invalid: [spec.template.spec.volumes[8].name: Invalid value: "ocs-deviceset-ibmc-vpc-block-metro-retain-10iops-tier-0-aaaaa1b-bridge": must be no more than 63 characters
Kubernetes PVC names must be fewer than 63 characters.
If you a have multizone VPC cluster and create your ODF storage cluster by using a retain
class like the ibmc-vpc-block-metro-retain-10iops-tier
, the corresponding ODF device set PVCs that are created by using this
storage class are assigned names that exceed the 63 character limit.
Create your own storage class where the name does not exceed 63 characters.
-
Get the YAML configuration of the storage class that you want to use in your ODF storage cluster and save it in a file on your local machine.
oc get sc ibmc-vpc-block-metro-retain-10iops-tier -o yaml
-
Edit the name of the storage class. Make sure that the name of your storage class is fewer than 30 characters to allow for the ODF storage cluster device set IDs to be under the 63 character kubernetes limit. Create the storage class in your cluster.
oc create -f <custom-storage-class.yaml>
-
Clean up your ODF deployment.
-
Create an ODF deployment that uses the storage class you created.