-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Updates rollback to SDN procedure to add live migration #77067
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
stevsmit
merged 1 commit into
openshift:main
from
stevsmit:live-migration-rollback-updates-10662
Jun 21, 2024
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,79 @@ | ||
| // Module included in the following assemblies: | ||
| // | ||
| // * networking/ovn_kubernetes_network_provider/rollback-to-openshift-sdn.adoc | ||
|
|
||
| :_mod-docs-content-type: PROCEDURE | ||
| [id="nw-ovn-kubernetes-rollback-live_{context}"] | ||
| = Using the live migration method to roll back to the OpenShift SDN network plugin | ||
|
|
||
| As a cluster administrator, you can roll back to the OpenShift SDN Container Network Interface (CNI) network plugin by using the live migration method. During the migration with this method, nodes are automatically rebooted and service to the cluster is not interrupted. | ||
|
|
||
| [IMPORTANT] | ||
| ==== | ||
| You must wait until the migration process from OpenShift SDN to OVN-Kubernetes network plugin is successful before initiating a rollback. | ||
| ==== | ||
|
|
||
| If a rollback to OpenShift SDN is required, the following table describes the process. | ||
|
|
||
| .Performing a rollback to OpenShift SDN | ||
| [cols="1,1a",options="header"] | ||
| |=== | ||
|
|
||
| |User-initiated steps|Migration activity | ||
stevsmit marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ifdef::openshift-rosa,openshift-dedicated[] | ||
| | Add the `unsupported-red-hat-internal-testing` annotation to the cluster-level network configuration. | ||
| | The Cluster Network Operator (CNO) acknowledges the unsupported testing environment. | ||
| endif::[] | ||
|
|
||
| | Patch the cluster-level networking configuration by changing the `networkType` from `OVNKubernetes` to `OpenShiftSDN`. | ||
stevsmit marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| | | ||
| Cluster Network Operator (CNO):: Performs the following actions: | ||
| + | ||
| -- | ||
| * Sets migration related fields in the `network.operator` custom resource (CR) and waits for routable MTUs to be applied to all nodes by the Machine Config Operator (MCO). | ||
| * Patches the `network.operator` CR to set the migration mode to `Live` for OpenShiftSDN and deploys the OpenShiftSDN network plugin in migration mode. | ||
stevsmit marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| * Deploys OVN-Kubernetes with hybrid overlay enabled. | ||
| * Waits for both CNI plugins to be deployed and updates the conditions in the status of the `network.config` CR. | ||
| * Triggers the MCO to apply the new machine config to each machine config pool, which includes node cordoning, draining, and rebooting. | ||
| * Removes migration-related fields from the `network.operator` CR and performs cleanup actions, such as deleting OpenShift SDN resources and redeploying OVN-Kubernetes in normal mode with the necessary configurations. | ||
| * Waits for the OpenShiftSDN redeployment and updates the status conditions in the `network.config` CR to indicate migration completion. | ||
| -- | ||
|
|
||
| |=== | ||
|
|
||
| .Prerequisites | ||
|
|
||
| * The {oc-first} is installed. | ||
| * Access to the cluster as a user with the cluster-admin role is available. | ||
| * The cluster is installed on infrastructure configured with the OVN-Kubernetes network plugin. | ||
| * A recent backup of the etcd database is available. | ||
| * A manual reboot can be triggered for each node. | ||
| * The cluster is in a known good state, without any errors. | ||
|
|
||
| .Procedure | ||
stevsmit marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| . To initiate the rollback to OpenShift SDN, enter the following command: | ||
| + | ||
| [source,terminal] | ||
| ---- | ||
| $ oc patch Network.config.openshift.io cluster --type='merge' --patch '{"metadata":{"annotations":{"network.openshift.io/network-type-migration":""}},"spec":{"networkType":"OpenShiftSDN"}}' | ||
| ---- | ||
|
|
||
| . To watch the progress of your migration, enter the following command: | ||
| + | ||
| [source,terminal] | ||
| ---- | ||
| $ watch -n1 'oc get network.config/cluster -o json | jq ".status.conditions[]|\"\\(.type) \\(.status) \\(.reason) \\(.message)\"" -r | column --table --table-columns NAME,STATUS,REASON,MESSAGE --table-columns-limit 4; echo; oc get mcp -o wide; echo; oc get node -o "custom-columns=NAME:metadata.name,STATE:metadata.annotations.machineconfiguration\\.openshift\\.io/state,DESIRED:metadata.annotations.machineconfiguration\\.openshift\\.io/desiredConfig,CURRENT:metadata.annotations.machineconfiguration\\.openshift\\.io/currentConfig,REASON:metadata.annotations.machineconfiguration\\.openshift\\.io/reason"' | ||
| ---- | ||
| + | ||
| The command prints the following information every second: | ||
| + | ||
| * The conditions on the status of the `network.config.openshift.io/cluster` object, reporting the progress of the migration. | ||
| * The status of different nodes with respect to the `machine-config-operator` resource, including whether they are upgrading or have been upgraded, as well as their current and desired configurations. | ||
|
|
||
| . After the rollback procedure has completed, enter the following command to remove the `network.openshift.io/network-type-migration=` annotation from the `network.config` custom resource: | ||
| + | ||
| [source,terminal] | ||
| ---- | ||
| $ oc annotate network.config cluster network.openshift.io/network-type-migration- | ||
| ---- | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.