Why are the ODF pods stuck at Pending
?
When you list pods in the openshift-storage
namespace with the oc get pods -n openshift-storage
command, the ODF pods are stuck at Pending
.
To determine why your storage cluster status is stuck at Pending
, describe the pods that have the status Pending
.
oc describe pod <pod> -n openshift-storage
In the output, check the Events
section for the following error:
"Error: 0/3 nodes are available: 1 node(s) didn't match pod affinity/anti-affinity, 2 node(s) had volume node affinity conflict"
This error indicates that that the classic or VPC cluster where your ODF storage cluster is installed is a multizone cluster, but the storage classes specified in the monStorageClassName
or osdStorageClassName
fields
in your CRD have a VolumeBindingMode
parameter that is set to Immediate
. Multizone ODF deployments require storage classes that have the VolumeBindingMode
parameter set to WaitForFirstConsumer
.
-
Create your own storage class with the
VolumeBindingMode
set toWaitForFirstConsumer
, or choose a pre-existing storage class with the same parameters. -
List the name of your ODF storage cluster.
oc get ocscluster
Example output:
NAME AGE ocscluster-vpc 71d
-
Delete the storage cluster.
oc delete ocscluster <ocs_cluster_name>
-
Verify that your storage cluster is deleted and is not listed.
oc get ocscluster
-
Re-create the CRD with the storage class you chose earlier.
-
Re-deploy the storage cluster.