Debugging OpenShift Data Foundation failures
Review the options to debug ODF and find the root causes of any failures.
Checking whether the pod that mounts your storage instance is successfully deployed
Follow the steps to review any error messages related to pod deployment.
-
List the pods in your cluster. A pod is successfully deployed if the pod shows a status of Running.
oc get pods
-
Get the details of your pod and review any error messages that are displayed in the Events section of your CLI output.
oc describe pod <pod_name>
-
Retrieve the logs for your pod and review any error messages.
oc logs <pod_name>
-
Review the ODF troubleshooting documentation for steps to resolve common errors.
Restarting your app pod
Some issues can be resolved by restarting and redeploying your pods. Follow the steps to redeploy a specific pod.
-
If your pod is part of a deployment, delete the pod and let the deployment rebuild it. If your pod is not part of a deployment, delete the pod and reapply your pod configuration file.
- Delete the pod.
Example outputoc delete pod <pod_name>
pod "nginx" deleted
- Reapply the configuration file to redeploy the pod.
Example outputoc apply -f <app.yaml>
pod/nginx created
- Delete the pod.
-
If restarting your pod does not resolve the issue, reload your worker nodes.
-
Verify that you use the latest IBM Cloud and IBM Cloud Kubernetes Service plug-in version.
ibmcloud update
ibmcloud plugin repo-plugins
ibmcloud plugin update
Verifying that the storage driver and plug-in pods show a status of Running
Follow the steps to check the status of your storage driver and plug-in pods and review any error messages.
-
List the pods in the
kube-system
project.oc get pods -n kube-system
-
If the storage driver and plug-in pods don't show a Running status, get more details of the pod to find the root cause. Depending on the status of your pod, the following commands might fail.
-
Get the names of the containers that run in the driver pod.
kubectl describe pod <pod_name> -n kube-system
-
Export the logs from the driver pod to a
logs.txt
file on your local machine.oc logs <pod_name> -n kube-system > logs.txt
-
Review the log file.
cat logs.txt
-
-
Check the latest logs for any error messages. Review the ODF troubleshooting documentation for steps to resolve common errors.
Checking and updating the oc CLI version
If you use a oc
CLI version that does not match at least the major.minor version of your cluster, you might experience unexpected results. For example, Kubernetes does not support oc
client versions that are 2 or more versions apart from the server version (n +/- 2).
-
Verify that the
oc
CLI version that you run on your local machine matches the Kubernetes version that is installed in your cluster. Show theoc
CLI version that is installed in your cluster and your local machine.oc version
Example output:
Client Version: version.Info{Major:"1", Minor:"23", GitVersion:"v1.31", GitCommit:"641856db18352033a0d96dbc99153fa3b27298e5", GitTreeState:"clean", BuildDate:"2019-03-25T15:53:57Z", GoVersion:"go1.12.1", Compiler:"gc", Platform:"darwin/amd64"} Server Version: version.Info{Major:"1", Minor:"23", GitVersion:"v1.31+IKS", GitCommit:"e15454c2216a73b59e9a059fd2def4e6712a7cf0", GitTreeState:"clean", BuildDate:"2019-04-01T10:08:07Z", GoVersion:"go1.11.5", Compiler:"gc", Platform:"linux/amd64"}
The CLI versions match if you can see the same version in
GitVersion
for the client and the server. You can ignore the+IKS
part of the version for the server. -
If the
oc
CLI versions on your local machine and your cluster don't match, either update your cluster or install a different CLI version on your local machine.
Debugging your ODF resources
Describe your ODF resources and review the command outputs for any error messages.
-
List the name of your ODF cluster.
oc get ocscluster
Example output:
NAME AGE ocscluster-vpc 71d
-
Describe the storage cluster and review the
Events
section of the output for any error messages.oc describe ocscluster <ocscluster-name>
-
List the ODF pods in the
kube-system
namespace and verify that they areRunning
.oc get pods -n kube-system
Example output
NAME READY STATUS RESTARTS AGE ibm-keepalived-watcher-5g2gs 1/1 Running 0 7d21h ibm-keepalived-watcher-8l4ld 1/1 Running 0 7d21h ibm-keepalived-watcher-mhkh5 1/1 Running 0 7d21h ibm-master-proxy-static-10.240.128.10 2/2 Running 0 71d ibm-master-proxy-static-10.240.128.11 2/2 Running 0 71d ibm-master-proxy-static-10.240.128.12 2/2 Running 0 71d ibm-ocs-operator-controller-manager-55667f4d68-md4zb 1/1 Running 8 15d ibm-vpc-block-csi-controller-0 4/4 Running 0 48d ibm-vpc-block-csi-node-6gnwv 3/3 Running 0 48d ibm-vpc-block-csi-node-j2h62 3/3 Running 0 48d ibm-vpc-block-csi-node-xpwpf 3/3 Running 0 48d vpn-5b8694cdb-pll6z
-
Describe the
ibm-ocs-operator-controller-manager
pod and review theEvents
section in the output for any error messages.oc describe pod <ibm-ocs-operator-controller-manager-a1a1a1a> -n kube-system
-
Review the logs of the
ibm-ocs-operator-controller-manager
.oc logs <ibm-ocs-operator-controller-manager-a1a1a1a> -n kube-system
-
Describe NooBaa and review the
Events
section of the output for any error messages.oc describe noobaa -n openshift-storage
-
Describe the
ibm-storage-metrics-agent
pod and review theEvents
section in the output for any error messages.oc get pods -n kube-system -l name=ibm-storage-metrics-agent
NAME READY STATUS RESTARTS AGE ibm-storage-metrics-agent-8685869cc6-79qzq
-
Review the logs from the
ibm-storage-metrics-agent
.oc logs ibm-storage-metrics-agent-xxx -n kube-system
-
Describe the
ocscluster
and review the output for error messages.oc describe ocscluster <ocscluster-name> -n openshift-storage
-
Gather data about the cluster by using the
oc adm must-gather
command.oc adm must-gather --image=registry.redhat.io/ocs4/ocs-must-gather-rhel8:latest --dest-dir=ocs_mustgather
-
For classic clusters or Satellite clusters that use local volumes on the worker node, make sure that the
disk-by-id
for the volumes that you used for theosd-device-path
andmon-device-path
parameters exists on the worker nodes. For more information about how to retrieve these volume IDs, see Gathering your device details -
Review the troubleshooting documentation for steps to solve common errors.