Failing to create pod sandbox on OpenShift 3

Solution In Progress - Updated -

Environment

  • Red Hat OpenShift Container Platform
    • 3.x

Issue

  • Getting the following error when trying to restart a pod:
  Failed create pod sandbox: rpc error code: = Unknown desc = [failed to set up sandbox container.
  • Getting error NetworkPlugin cni failed to set up pod

Resolution

Delete the OpenShift SDN pod in error state identified in diagnostics steps.

$ oc delete pod ${podname}

Root Cause

One of the OpenShift SDN pods in that particular namespace was corrupted. So, there was no network available to run PODs.

Diagnostic Steps

Run the following command to inspect pods state and check the output for OpenShift SND pods in error state:

$ oc get pods --all-namespaces
openshift-sdn                       ovs-wrzr9                                        1/1       Running             4          94d
openshift-sdn                       ovs-xg2wd                                        1/1       Running             7          94d
openshift-sdn                       ovs-xtrsr                                        1/1       Running             11644      94d
openshift-sdn                       ovs-z6jps                                        1/1       Running             3          94d
openshift-sdn                       ovs-zphdl                                        1/1       Running             8          94d
openshift-sdn                       ovs-zqtfg                                        1/1       Running             6          94d

NOTE: the list above shows that pod ovs-xtrsr had restarted 11644 since creation. That is the one to be recreated.

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.