This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.13.3. Rollback to the OpenShift SDN network provider
As a cluster administrator, you can rollback to the OpenShift SDN cluster default Container Network Interface (CNI) provider from the OVN-Kubernetes default CNI network provider if the migration to OVN-Kubernetes unsuccessful.
As a cluster administrator, you can rollback your cluster to the OpenShift SDN default Container Network Interface (CNI) network provider. During the rollback, you must reboot every node in your cluster.
Only rollback to OpenShift SDN if the migration to OVN-Kubernetes is unsuccessful.
Prerequisites
-
Install the OpenShift CLI (
oc
). -
Access to the cluster as a user with the
cluster-admin
role. A cluster installed on bare metal infrastructure configured with the OVN-Kubernetes default CNI network provider.
To enable the migration, set an annotation on the Cluster Network Operator configuration object by entering the following command:
oc annotate Network.operator.openshift.io cluster \ 'networkoperator.openshift.io/network-migration'=""
$ oc annotate Network.operator.openshift.io cluster \ 'networkoperator.openshift.io/network-migration'=""
Copy to Clipboard Copied! Toggle word wrap Toggle overflow To change the default CNI network provider, enter the following command:
oc patch Network.config.openshift.io cluster \ --type='merge' --patch '{ "spec": { "networkType": "OpenShiftSDN" } }'
$ oc patch Network.config.openshift.io cluster \ --type='merge' --patch '{ "spec": { "networkType": "OpenShiftSDN" } }'
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Optional: Use the backup of the cluster network configuration that you created before the migration to restore any customizations to the network configuration that you might have made. To restore the customizations, enter the following command to edit the Cluster Network Operator configuration:
oc edit Network.config.openshift.io cluster
$ oc edit Network.config.openshift.io cluster
Copy to Clipboard Copied! Toggle word wrap Toggle overflow To confirm that the migration disabled the OVN-Kubernetes default CNI network provider and removed all the OVN-Kubernetes pods, enter the following command. It might take several moments for all the OVN-Kubernetes pods to stop.
watch oc get pod -n openshift-ovn-kubernetes
$ watch oc get pod -n openshift-ovn-kubernetes
Copy to Clipboard Copied! Toggle word wrap Toggle overflow To complete the rollback, reboot each node in your cluster. For example, you could use a bash script similar to the following. The script assumes that you can connect to each host by using
ssh
and that you have configuredsudo
to not prompt for a password.Copy to Clipboard Copied! Toggle word wrap Toggle overflow After the nodes in your cluster have rebooted, enter the following command to confirm that the default CNI network provider is OpenShift SDN. The value of
status.networkType
must beOpenShiftSDN
.oc get network.config/cluster -o jsonpath='{.status.networkType}{"\n"}'
$ oc get network.config/cluster -o jsonpath='{.status.networkType}{"\n"}'
Copy to Clipboard Copied! Toggle word wrap Toggle overflow To confirm that the OpenShift SDN pods are in the
READY
state, enter the following command:oc get pod -n openshift-sdn --watch
$ oc get pod -n openshift-sdn --watch
Copy to Clipboard Copied! Toggle word wrap Toggle overflow To remove the migration annotation from the Cluster Network Operator configuration object, enter the following command:
oc annotate Network.operator.openshift.io cluster \ networkoperator.openshift.io/network-migration-
$ oc annotate Network.operator.openshift.io cluster \ networkoperator.openshift.io/network-migration-
Copy to Clipboard Copied! Toggle word wrap Toggle overflow To remove the OVN-Kubernetes network provider namespace, enter the following command:
oc delete namespace openshift-ovn-kubernetes
$ oc delete namespace openshift-ovn-kubernetes
Copy to Clipboard Copied! Toggle word wrap Toggle overflow