-
Notifications
You must be signed in to change notification settings - Fork 1.8k
OSDOCS-16201-RE: Documented migrating a br-ex interface to NMState #99769
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
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
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,116 @@ | ||
| // Module included in the following assemblies: | ||
| // | ||
| // * installing/installing_bare_metal/bare-metal-postinstallation-configuration.adoc | ||
|
|
||
| :_mod-docs-content-type: PROCEDURE | ||
| [id="migrating-br-ex-bridge-nmstate_{context}"] | ||
| = Migrating a configured br-ex bridge to NMState | ||
|
|
||
| If you used the `configure-ovs.sh` shell script to set a `br-ex` bridge during cluster installation, you can migrate the `br-ex` bridge to NMState as a postinstallation task. NMState provides a declarative and idempotent way to handle configuring the `br-ex` bridge. | ||
|
|
||
| [NOTE] | ||
| ==== | ||
| The initial steps in the procedure do not show example configurations. For detailed example configurations that would represent objects to create during cluster installation, see the "Creating a manifest object that includes a customized br-ex bridge" link in the _Additional resources_ section. | ||
| ==== | ||
|
|
||
| After you migrate your configured `br-ex` bridge to NMState, you cannot reverse the operation. This means that you cannot migrate back to the shell script version of the `br-ex` bridge. | ||
|
|
||
| [IMPORTANT] | ||
| ==== | ||
| Misconfiguring any files that form part of the migration operation can cause disruptive changes to your cluster. Reverting these changes might not always be possible. | ||
| ==== | ||
|
|
||
| .Prerequisties | ||
|
|
||
| * You used the `configure-ovs.sh` shell script to set a `br-ex` bridge for your cluster. | ||
|
|
||
| .Procedure | ||
|
|
||
| . Create an NMState configuration file for your customized `br-ex` bridge network. In a later step, the `MachineConfig` object saves the NMState configuration file in the `/etc/nmstate/openshift` directory path. | ||
|
|
||
| . Use the `cat` command to base64-encode the contents of the NMState configuration file: | ||
| + | ||
| [source,terminal] | ||
| ---- | ||
| $ cat <nmstate_configuration>.yaml | base64 | ||
| ---- | ||
| + | ||
| -- | ||
| where: | ||
|
|
||
| `<nmstate_configuration>`:: Specifies `<nmstate_configuration>` with the name of your NMState resource YAML file. | ||
| -- | ||
|
|
||
| . Create a `MachineConfig` manifest file and define a customized `br-ex` bridge network configuration in the file. Additionally, ensure that you specify the path to the base64-encoded NMState configuration file so that the contents of this file get embedded in the `MachineConfig` manifest file. | ||
|
|
||
| . Apply the updates from the `MachineConfig` object to your cluster by entering the following command: | ||
| + | ||
| [source,terminal] | ||
| ---- | ||
| $ oc apply -f <machine_config>.yml | ||
| ---- | ||
|
|
||
| . Create a bare `MachineConfig` object but do not make any configuration changes to the file: | ||
| + | ||
| [source,yaml] | ||
| ---- | ||
| apiVersion: machineconfiguration.openshift.io/v1 | ||
| kind: MachineConfig | ||
| metadata: | ||
| labels: | ||
| machineconfiguration.openshift.io/role: master | ||
| name: 10-force-reboot-master | ||
| spec: | ||
| config: | ||
| ignition: | ||
| version: 3.2.0 | ||
| storage: | ||
| files: | ||
| - contents: | ||
| source: data:text/plain;charset=utf-8;base64, | ||
| mode: 0644 | ||
| overwrite: true | ||
| path: /etc/force-reboot | ||
| --- | ||
| apiVersion: machineconfiguration.openshift.io/v1 | ||
| kind: MachineConfig | ||
| metadata: | ||
| labels: | ||
| machineconfiguration.openshift.io/role: worker | ||
| name: 10-force-reboot-worker | ||
| spec: | ||
| config: | ||
| ignition: | ||
| version: 3.2.0 | ||
| storage: | ||
| files: | ||
| - contents: | ||
| source: data:text/plain;charset=utf-8;base64, | ||
| mode: 0644 | ||
| overwrite: true | ||
| path: /etc/force-reboot | ||
| # ... | ||
| ---- | ||
|
|
||
| . Start a reboot operation by applying the bare `MachineConfig` object configuration to your cluster by entering the following command: | ||
| + | ||
| [source,terminal] | ||
| ---- | ||
| $ oc apply -f <bare_machine_config>.yml | ||
| ---- | ||
|
|
||
| . Delete the bare `MachineConfig` object by entering the following command: | ||
| + | ||
| [source,terminal] | ||
| ---- | ||
| $ oc delete machineconfig <machine_config_name> | ||
| ---- | ||
|
|
||
| .Verification | ||
|
|
||
| * Use the `nmstatectl` tool to check the configuration for the `br-ex` bridge interface by running the following command. The tool checks a node that runs the `br-ex` bridge interface and not the location where you deployed the `MachineConfig` objects. | ||
| + | ||
| [source,terminal] | ||
| ---- | ||
| $ sudo nmstatectl show br-ex | ||
| ---- | ||
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.