|
| 1 | +// Module included in the following assemblies: |
| 2 | +// |
| 3 | +// * installing/installing_bare_metal/bare-metal-postinstallation-configuration.adoc |
| 4 | + |
| 5 | +:_mod-docs-content-type: PROCEDURE |
| 6 | +[id="making-disruptive-changes-br-ex-bridge.adoc_{context}"] |
| 7 | += Making disruptive changes to a customized br-ex bridge |
| 8 | + |
| 9 | +For certain situations, you might need to make disruptive changes to a `br-ex` bridge for planned maintenance or network configuration updates. A `br-ex` bridge is a gateway for all external network traffic from your workloads, so any change to the bridge might temporarily disconnect pods and virtual machines (VMs) from an external network. |
| 10 | + |
| 11 | +The following procedure uses an example to show making disruptive changes to a `br-ex` bridge that minimizes any impact to running cluster workloads. |
| 12 | + |
| 13 | +For all the nodes in your cluster to receive the `br-ex` bridge changes, you must reboot your cluster. Editing the existing `MachineConfig` object does not force a reboot operation, so you must create an additional `MachineConfig` object to force a reboot operation for the cluster. |
| 14 | + |
| 15 | +[IMPORTANT] |
| 16 | +==== |
| 17 | +Red Hat does not support changing IP addresses for nodes as a postintallation task. |
| 18 | +==== |
| 19 | + |
| 20 | +.Prerequisites |
| 21 | + |
| 22 | +* You created a manifest object that includes a `br-ex` bridge. |
| 23 | +* You deployed your cluster that has the configured `br-ex` bridge. |
| 24 | +
|
| 25 | +.Procedure |
| 26 | + |
| 27 | +. Make changes to the NMState configuration file that you created during cluster installation for customizing your `br-ex` bridge network interface. |
| 28 | ++ |
| 29 | +[IMPORTANT] |
| 30 | +==== |
| 31 | +Before you save the `MachineConfig` object, check the changed parameter values. If you enter wrong values and save the file, you cannot recover the file to its original state and this impacts networking functionality for your cluster. |
| 32 | +==== |
| 33 | + |
| 34 | +. Use the `base64` command to re-encode the contents of the NMState configuration by entering the following command: |
| 35 | ++ |
| 36 | +[source,terminal] |
| 37 | +---- |
| 38 | +$ base64 -w0 <nmstate_configuration>.yml <1> |
| 39 | +---- |
| 40 | +<1> Replace `<nmstate_configuration>` with the name of your NMState resource YAML file. |
| 41 | + |
| 42 | +. Update the `MachineConfig` manifest file that you created during cluster installation and re-define the customized `br-ex` bridge network interface. |
| 43 | + |
| 44 | +. Apply the updates from the `MachineConfig` object to your cluster by entering the following command: |
| 45 | ++ |
| 46 | +[source,terminal] |
| 47 | +---- |
| 48 | +$ oc apply -f <machine_config>.yml |
| 49 | +---- |
| 50 | + |
| 51 | +. Create a bare `MachineConfig` object but do not make any configuration changes to the file. |
| 52 | ++ |
| 53 | +[source,yaml] |
| 54 | +---- |
| 55 | +apiVersion: machineconfiguration.openshift.io/v1 |
| 56 | +kind: MachineConfig |
| 57 | +metadata: |
| 58 | + labels: |
| 59 | + machineconfiguration.openshift.io/role: master |
| 60 | + name: 10-force-reboot-master |
| 61 | +spec: |
| 62 | + config: |
| 63 | + ignition: |
| 64 | + version: 3.2.0 |
| 65 | + storage: |
| 66 | + files: |
| 67 | + - contents: |
| 68 | + source: data:text/plain;charset=utf-8;base64, |
| 69 | + mode: 0644 |
| 70 | + overwrite: true |
| 71 | + path: /etc/force-reboot |
| 72 | +--- |
| 73 | +apiVersion: machineconfiguration.openshift.io/v1 |
| 74 | +kind: MachineConfig |
| 75 | +metadata: |
| 76 | + labels: |
| 77 | + machineconfiguration.openshift.io/role: worker |
| 78 | + name: 10-force-reboot-worker |
| 79 | +spec: |
| 80 | + config: |
| 81 | + ignition: |
| 82 | + version: 3.2.0 |
| 83 | + storage: |
| 84 | + files: |
| 85 | + - contents: |
| 86 | + source: data:text/plain;charset=utf-8;base64, |
| 87 | + mode: 0644 |
| 88 | + overwrite: true |
| 89 | + path: /etc/force-reboot |
| 90 | +# ... |
| 91 | +---- |
| 92 | + |
| 93 | +. Start a reboot operation by applying the bare `MachineConfig` object configuration to your cluster by entering the following command: |
| 94 | ++ |
| 95 | +[source,terminal] |
| 96 | +---- |
| 97 | +$ oc apply -f <bare_machine_config>.yml |
| 98 | +---- |
| 99 | + |
| 100 | +. Check that each node in your cluster has the `Ready` status to indicate that they have finished rebooting by entering the following command: |
| 101 | ++ |
| 102 | +[source,terminal] |
| 103 | +---- |
| 104 | +$ oc get nodes |
| 105 | +---- |
| 106 | + |
| 107 | +. Delete the bare `MachineConfig` object by entering the following command: |
| 108 | ++ |
| 109 | +[source,terminal] |
| 110 | +---- |
| 111 | +$ oc delete machineconfig <machine_config_name> |
| 112 | +---- |
| 113 | + |
| 114 | +.Verification |
| 115 | + |
| 116 | +* 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. |
| 117 | ++ |
| 118 | +[source,terminal] |
| 119 | +---- |
| 120 | +$ sudo nmstatectl show br-ex |
| 121 | +---- |
| 122 | +
|
0 commit comments