Skip to content

Commit b52b9f4

Browse files
committed
OCPBUGS-61836: Updated the br-ex NNCP example's ip values
1 parent a59de3a commit b52b9f4

File tree

4 files changed

+82
-51
lines changed

4 files changed

+82
-51
lines changed

installing/installing_bare_metal/upi/installing-bare-metal.adoc

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ In {product-title} {product-version}, you can install a cluster on bare-metal in
1010

1111
[IMPORTANT]
1212
====
13-
While you might be able to follow this procedure to deploy a cluster on virtualized or cloud environments, you must be aware of additional considerations for non-bare-metal platforms. Review the information in the link:https://access.redhat.com/articles/4207611[guidelines for deploying {product-title} on non-tested platforms] before you attempt to install an {product-title} cluster in such an environment.
13+
While you might be able to follow this procedure to deploy a cluster on virtualized or cloud environments, you must be aware of additional
14+
considerations for non-bare-metal platforms. Review the information in the link:https://access.redhat.com/articles/4207611[guidelines for deploying {product-title} on non-tested platforms] before you attempt to install an {product-title} cluster in such an environment.
1415
====
1516

1617
== Prerequisites
@@ -24,6 +25,7 @@ While you might be able to follow this procedure to deploy a cluster on virtuali
2425
Be sure to also review this site list if you are configuring a proxy.
2526
====
2627

28+
// Internet access for OpenShift Container Platform
2729
include::modules/cluster-entitlements.adoc[leveloffset=+1]
2830

2931
[role="_additional-resources"]
@@ -39,8 +41,10 @@ of the required machines.
3941

4042
This section describes the requirements for deploying {product-title} on user-provisioned infrastructure.
4143

44+
// Required machines for cluster installation
4245
include::modules/installation-machine-requirements.adoc[leveloffset=+2]
4346

47+
// Minimum resource requirements for cluster installation
4448
include::modules/installation-minimum-resource-requirements.adoc[leveloffset=+2]
4549

4650
[role="_additional-resources"]
@@ -81,6 +85,7 @@ include::modules/installation-dns-user-infra.adoc[leveloffset=+2]
8185

8286
* xref:../../../installing/installing_bare_metal/upi/installing-bare-metal.adoc#installation-user-provisioned-validating-dns_installing-bare-metal[Validating DNS resolution for user-provisioned infrastructure]
8387

88+
// Load balancing requirements for user-provisioned infrastructure
8489
include::modules/installation-load-balancing-user-infra.adoc[leveloffset=+2]
8590

8691
// Creating a manifest object that includes a customized `br-ex` bridge
@@ -99,6 +104,7 @@ include::modules/creating-scaling-machine-sets-compute-nodes-networking.adoc[lev
99104
// Enabling OVS balance-slb mode for your cluster
100105
include::modules/enabling-OVS-balance-slb-mode.adoc[leveloffset=+1]
101106

107+
// Preparing the user-provisioned infrastructure
102108
include::modules/installation-infrastructure-user-infra.adoc[leveloffset=+1]
103109

104110
[role="_additional-resources"]
@@ -113,6 +119,7 @@ include::modules/installation-infrastructure-user-infra.adoc[leveloffset=+1]
113119
* xref:../../../installing/installing_bare_metal/upi/installing-bare-metal.adoc#installation-user-provisioned-validating-dns_installing-bare-metal[Validating DNS resolution for user-provisioned infrastructure]
114120
* xref:../../../installing/installing_bare_metal/upi/installing-bare-metal.adoc#installation-load-balancing-user-infra_installing-bare-metal[Load balancing requirements for user-provisioned infrastructure]
115121

122+
// Validating DNS resolution for user-provisioned infrastructure
116123
include::modules/installation-user-provisioned-validating-dns.adoc[leveloffset=+1]
117124

118125
[role="_additional-resources"]
@@ -121,23 +128,28 @@ include::modules/installation-user-provisioned-validating-dns.adoc[leveloffset=+
121128
* xref:../../../installing/installing_bare_metal/upi/installing-bare-metal.adoc#installation-dns-user-infra_installing-bare-metal[User-provisioned DNS requirements]
122129
* xref:../../../installing/installing_bare_metal/upi/installing-bare-metal.adoc#installation-load-balancing-user-infra_installing-bare-metal[Load balancing requirements for user-provisioned infrastructure]
123130

131+
// Generating a key pair for cluster node SSH access
124132
include::modules/ssh-agent-using.adoc[leveloffset=+1]
125133

126134
[role="_additional-resources"]
127135
.Additional resources
128136

129137
* xref:../../../support/troubleshooting/verifying-node-health.adoc#verifying-node-health[Verifying node health]
130138

139+
// Obtaining the installation program
131140
include::modules/installation-obtaining-installer.adoc[leveloffset=+1]
132141

142+
// Installing the OpenShift CLI
133143
include::modules/cli-installing-cli.adoc[leveloffset=+1]
134144

145+
// Manually creating the installation configuration file
135146
include::modules/installation-initializing-manual.adoc[leveloffset=+1]
136147

137148
[role="_additional-resources"]
138149
.Additional resources
139150
* xref:../../../installing/installing_bare_metal/upi/installation-config-parameters-bare-metal.adoc#installation-config-parameters-bare-metal[Installation configuration parameters for bare metal]
140151

152+
// Sample install-config.yaml file for bare metal
141153
include::modules/installation-bare-metal-config-yaml.adoc[leveloffset=+2]
142154

143155
[role="_additional-resources"]

modules/creating-manifest-file-customized-br-ex-bridge.adoc

Lines changed: 66 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,10 @@ ifndef::postinstall-bare-metal-ipi,postinstall-bare-metal-upi[]
2323
As an alternative to using the `configure-ovs.sh` shell script to set a `br-ex` bridge on a bare-metal platform, you can create a `MachineConfig` object that includes an NMState configuration file. The host `nmstate-configuration.service` and `nmstate.service` apply the NMState configuration file to each node that runs in your cluster.
2424
endif::postinstall-bare-metal-ipi,postinstall-bare-metal-upi[]
2525

26-
ifdef::postinstall-bare-metal-ipi,postinstall-bare-metal-upi[]
27-
As an alternative to using the `configure-ovs.sh` shell script to set a `br-ex` bridge on a bare-metal platform, you can create a `NodeNetworkConfigurationPolicy` (NNCP) custom resource (CR) that includes an NMState configuration file. The Kubernetes NMState Operator uses the NMState configuration file to create a customized `br-ex` bridge network configuration on each node in your cluster.
26+
ifndef::postinstall-bare-metal-ipi,postinstall-bare-metal-upi[]
27+
As an alternative to using the `configure-ovs.sh` shell script to set a `br-ex` bridge on a bare-metal platform, you can create a `NodeNetworkConfigurationPolicy` (NNCP) custom resource (CR) that includes an NMState configuration file.
28+
29+
The Kubernetes NMState Operator uses the NMState configuration file to create a customized `br-ex` bridge network configuration on each node in your cluster.
2830

2931
[IMPORTANT]
3032
====
@@ -93,11 +95,11 @@ ifndef::postinstall-bare-metal-ipi,postinstall-bare-metal-upi[]
9395
[source,yaml]
9496
----
9597
interfaces:
96-
- name: enp2s0 <1>
97-
type: ethernet <2>
98-
state: up <3>
98+
- name: enp2s0
99+
type: ethernet
100+
state: up
99101
ipv4:
100-
enabled: false <4>
102+
enabled: false
101103
ipv6:
102104
enabled: false
103105
- name: br-ex
@@ -113,7 +115,7 @@ interfaces:
113115
options:
114116
mcast-snooping-enable: true
115117
port:
116-
- name: enp2s0 <5>
118+
- name: enp2s0
117119
- name: br-ex
118120
- name: br-ex
119121
type: ovs-interface
@@ -122,27 +124,33 @@ interfaces:
122124
ipv4:
123125
enabled: true
124126
dhcp: true
125-
auto-route-metric: 48 <6>
127+
auto-route-metric: 48
126128
ipv6:
127129
enabled: true
128130
dhcp: true
129131
auto-route-metric: 48
130132
# ...
131133
----
132-
<1> Name of the interface.
133-
<2> The type of ethernet.
134-
<3> The requested state for the interface after creation.
135-
<4> Disables IPv4 and IPv6 in this example.
136-
<5> The node NIC to which the bridge attaches.
137-
<6> Set the parameter to `48` to ensure the `br-ex` default route always has the highest precedence (lowest metric). This configuration prevents routing conflicts with any other interfaces that are automatically configured by the `NetworkManager` service.
134+
+
135+
where:
136+
+
137+
`interfaces.name`:: Name of the interface.
138+
`interfaces.type`:: The type of ethernet.
139+
`interfaces.state`:: The requested state for the interface after creation.
140+
`ipv4.enabled`:: Disables IPv4 and IPv6 in this example.
141+
`port.name`:: The node NIC to which the bridge attaches.
142+
`auto-route-metric`:: Set the parameter to `48` to ensure the `br-ex` default route always has the highest precedence (lowest metric). This configuration prevents routing conflicts with any other interfaces that are automatically configured by the `NetworkManager` service.
138143

139144
. Use the `cat` command to base64-encode the contents of the NMState configuration:
140145
+
141146
[source,terminal]
142147
----
143-
$ cat <nmstate_configuration>.yaml | base64 <1>
148+
$ cat <nmstate_configuration>.yml | base64
144149
----
145-
<1> Replace `<nmstate_configuration>` with the name of your NMState resource YAML file.
150+
+
151+
where:
152+
+
153+
`<nmstate_configuration>`:: Replace `<nmstate_configuration>` with the name of your NMState resource YAML file.
146154

147155
. Create a `MachineConfig` manifest file and define a customized `br-ex` bridge network configuration analogous to the following example:
148156
+
@@ -153,28 +161,31 @@ kind: MachineConfig
153161
metadata:
154162
labels:
155163
machineconfiguration.openshift.io/role: worker
156-
name: 10-br-ex-worker <1>
164+
name: 10-br-ex-worker
157165
spec:
158166
config:
159167
ignition:
160168
version: 3.2.0
161169
storage:
162170
files:
163171
- contents:
164-
source: data:text/plain;charset=utf-8;base64,<base64_encoded_nmstate_configuration> <2>
172+
source: data:text/plain;charset=utf-8;base64,<base64_encoded_nmstate_configuration>
165173
mode: 0644
166174
overwrite: true
167-
path: /etc/nmstate/openshift/worker-0.yml <3>
175+
path: /etc/nmstate/openshift/worker-0.yml
168176
- contents:
169177
source: data:text/plain;charset=utf-8;base64,<base64_encoded_nmstate_configuration>
170178
mode: 0644
171179
overwrite: true
172-
path: /etc/nmstate/openshift/worker-1.yml <3>
180+
path: /etc/nmstate/openshift/worker-1.yml
173181
# ...
174182
----
175-
<1> The name of the policy.
176-
<2> Writes the encoded base64 information to the specified path.
177-
<3> For each node in your cluster, specify the hostname path to your node and the base-64 encoded Ignition configuration file data for the machine type. The `worker` role is the default role for nodes in your cluster. The `.yaml` extension does not work when specifying the short hostname, `hostname -s`, path for each node or all nodes in the `MachineConfig` manifest file.
183+
+
184+
where:
185+
+
186+
`metadata.name`:: The name of the policy.
187+
`contents.source`:: Writes the encoded base64 information to the specified path.
188+
`path`:: For each node in your cluster, specify the hostname path to your node and the base-64 encoded Ignition configuration file data for the machine type. The `worker` role is the default role for nodes in your cluster. You must use the `.yml` extension for configuration files, such as `$(hostname -s).yml` when specifying the short hostname path for each node or all nodes in the `MachineConfig` manifest file.
178189
+
179190
If you have a single global configuration specified in an `/etc/nmstate/openshift/cluster.yml` configuration file that you want to apply to all nodes in your cluster, you do not need to specify the short hostname path for each node, such as `/etc/nmstate/openshift/<node_hostname>.yml`. For example:
180191
+
@@ -188,35 +199,39 @@ If you have a single global configuration specified in an `/etc/nmstate/openshif
188199
path: /etc/nmstate/openshift/cluster.yml
189200
# ...
190201
----
202+
203+
. Apply the updates from the `MachineConfig` object to your cluster by entering the following command:
204+
+
205+
[source,terminal]
206+
----
207+
$ oc apply -f <machine_config>.yml
208+
----
191209
endif::postinstall-bare-metal-ipi,postinstall-bare-metal-upi[]
192210

193-
ifdef::postinstall-bare-metal-ipi,postinstall-bare-metal-upi[]
194-
* Create a `NodeNetworkConfigurationPolicy` (NNCP) CR and define a customized `br-ex` bridge network configuration. Depending on your needs, ensure that you set a masquerade IP for either the `ipv4.address.ip`, `ipv6.address.ip`, or both parameters. Always include a masquerade IP address in the NNCP CR and this address must match an in-use IP address block.
211+
ifdef::postinstall-bare-metal[]
212+
* Create a `NodeNetworkConfigurationPolicy` (NNCP) CR and define a customized `br-ex` bridge network configuration. The `br-ex` NNCP CR must include the OVN-Kubernetes masquerade IP address and subnet of your network. The example NNCP CR includes default values in the `ipv4.address.ip` and `ipv6.address.ip` parameters. You can set the masquerade IP address in the `ipv4.address.ip`, `ipv6.address.ip`, or both parameters.
195213
+
196214
[IMPORTANT]
197215
====
198-
As a post-installation task, you can configure most parameters for a customized `br-ex` bridge that you defined in an existing NNCP CR, except for the primary IP address of the customized `br-ex` bridge.
199-
200-
If you want to convert your single-stack cluster network to a dual-stack cluster network, you can add or change a secondary IPv6 address in the NNCP CR, but the existing primary IP address cannot be changed.
216+
As a post-installation task, you cannot change the primary IP address of the customized `br-ex` bridge. If you want to convert your single-stack cluster network to a dual-stack cluster network, you can add or change a secondary IPv6 address in the NNCP CR, but the existing primary IP address cannot be changed.
201217
====
202218
+
203-
.Example of an NNCP CR that sets IPv6 and IPv4 masquerade IP addresses
204219
[source,yaml]
205220
----
206221
apiVersion: nmstate.io/v1
207222
kind: NodeNetworkConfigurationPolicy
208223
metadata:
209-
name: worker-0-br-ex <1>
224+
name: worker-0-br-ex
210225
spec:
211226
nodeSelector:
212227
kubernetes.io/hostname: worker-0
213228
desiredState:
214229
interfaces:
215-
- name: enp2s0 <2>
216-
type: ethernet <3>
217-
state: up <4>
230+
- name: enp2s0
231+
type: ethernet
232+
state: up
218233
ipv4:
219-
enabled: false <5>
234+
enabled: false
220235
ipv6:
221236
enabled: false
222237
- name: br-ex
@@ -232,7 +247,7 @@ spec:
232247
options:
233248
mcast-snooping-enable: true
234249
port:
235-
- name: enp2s0 <6>
250+
- name: enp2s0
236251
- name: br-ex
237252
- name: br-ex
238253
type: ovs-interface
@@ -241,27 +256,31 @@ spec:
241256
ipv4:
242257
enabled: true
243258
dhcp: true
244-
auto-route-metric: 48 <7>
259+
auto-route-metric: 48
245260
address:
246-
- ip: "169.254.169.2"
247-
prefix-length: 29
261+
- ip: "169.254.0.2"
262+
prefix-length: 17
248263
ipv6:
249264
enabled: true
250265
dhcp: true
251266
auto-route-metric: 48
252267
address:
253268
- ip: "fd69::2"
254-
prefix-length: 125
269+
prefix-length: 112
255270
# ...
256271
----
257-
<1> Name of the policy.
258-
<2> Name of the interface.
259-
<3> The type of ethernet.
260-
<4> The requested state for the interface after creation.
261-
<5> Disables IPv4 and IPv6 in this example.
262-
<6> The node NIC to which the bridge is attached.
263-
<7> Set the parameter to `48` to ensure the `br-ex` default route always has the highest precedence (lowest metric). This configuration prevents routing conflicts with any other interfaces that are automatically configured by the `NetworkManager` service.
264-
endif::postinstall-bare-metal-ipi,postinstall-bare-metal-upi[]
272+
+
273+
where:
274+
+
275+
`metadata.name`:: Name of the policy.
276+
`interfaces.name`:: Name of the interface.
277+
`interfaces.type`:: The type of ethernet.
278+
`interfaces.state`:: The requested state for the interface after creation.
279+
`ipv4.enabled`:: Disables IPv4 and IPv6 in this example.
280+
`port.name`:: The node NIC to which the bridge is attached.
281+
`address.ip`:: Shows the default IPv4 and IPv6 IP addresses. Ensure that you set the masquerade IPv4 and IPv6 IP addresses of your network.
282+
`auto-route-metric`:: Set the parameter to `48` to ensure the `br-ex` default route always has the highest precedence (lowest metric). This configuration prevents routing conflicts with any other interfaces that are automatically configured by the `NetworkManager` service.
283+
endif::postinstall-bare-metal[]
265284

266285
.Next steps
267286

modules/ipi-install-additional-install-config-parameters.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ a| `provisioningNetworkInterface` | | The name of the network interface on node
119119

120120
| `apiVIPs` | a| (Optional) The virtual IP address for Kubernetes API communication.
121121

122-
You must either provide this setting in the `install-config.yaml` file as a reserved IP from the `MachineNetwork` parameter or preconfigured in the DNS so that the default name resolves correctly. Use the virtual IP address and not the FQDN when adding a value to the `apiVIPs` configuration setting in the `install-config.yaml` file. The primary IP address must be from the IPv4 network when using dual stack networking. If not set, the installation program uses `api.<cluster_name>.<base_domain>` to derive the IP address from the DNS.
122+
You must either provide this setting in the `install-config.yaml` file as a reserved IP from the `MachineNetwork` parameter or preconfigured in the DNS so that the default name resolves correctly. Use the virtual IP address and not the FQDN when adding a value to the `apiVIPs` configuration setting in the `install-config.yaml` file. For dual-stack networking, the primary IP address can be either an IPv4 network or an IPv6 network. If not set, the installation program uses `api.<cluster_name>.<base_domain>` to derive the IP address from the DNS.
123123

124124
[NOTE]
125125
====
@@ -131,7 +131,7 @@ Before {product-title} 4.12, the cluster installation program only accepted an I
131131

132132
| `ingressVIPs` | a| (Optional) The virtual IP address for ingress traffic.
133133

134-
You must either provide this setting in the `install-config.yaml` file as a reserved IP from the `MachineNetwork` parameter or preconfigured in the DNS so that the default name resolves correctly. Use the virtual IP address and not the FQDN when adding a value to the `ingressVIPs` configuration setting in the `install-config.yaml` file. The primary IP address must be from the IPv4 network when using dual stack networking. If not set, the installation program uses `test.apps.<cluster_name>.<base_domain>` to derive the IP address from the DNS.
134+
You must either provide this setting in the `install-config.yaml` file as a reserved IP from the `MachineNetwork` parameter or preconfigured in the DNS so that the default name resolves correctly. Use the virtual IP address and not the FQDN when adding a value to the `ingressVIPs` configuration setting in the `install-config.yaml` file. For dual-stack networking, the primary IP address can be either an IPv4 network or an IPv6 network. If not set, the installation program uses `test.apps.<cluster_name>.<base_domain>` to derive the IP address from the DNS.
135135

136136
[NOTE]
137137
====

networking/k8s_nmstate/k8s-nmstate-updating-node-network-config.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ For more information about how to install the NMState Operator, see xref:../../n
1313

1414
[IMPORTANT]
1515
====
16-
You cannot provide any configuration that modifies the br-ex bridge, an OVN-Kubernetes-managed Open vSwitch bridge. However, you can configure a customized br-ex bridge.
16+
You cannot modify an existing `br-ex` bridge, an OVN-Kubernetes-managed Open vSwitch bridge, or any interfaces, bonds, VLANs, and so on that associate with the `br-ex` bridge. However, you can configure a customized br-ex bridge.
1717
1818
For more information, see "Creating a manifest object that includes a customized br-ex bridge" in the _Deploying installer-provisioned clusters on bare metal_ document or the _Installing a user-provisioned cluster on bare metal_ document.
1919
====

0 commit comments

Comments
 (0)