Skip to content

Commit 586108e

Browse files
authored
Merge pull request #101218 from dfitzmau/OCPBUGS-61836
OCPBUGS-61836: Updated the br-ex NNCP example's ip values
2 parents 74377d7 + ae79704 commit 586108e

File tree

4 files changed

+73
-54
lines changed

4 files changed

+73
-54
lines changed

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

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,12 @@ include::_attributes/common-attributes.adoc[]
66

77
toc::[]
88

9-
In {product-title} {product-version}, you can install a cluster on
10-
bare metal infrastructure that you provision.
9+
In {product-title} {product-version}, you can install a cluster on bare-metal infrastructure that you provision.
1110

1211
[IMPORTANT]
1312
====
14-
While you might be able to follow this procedure to deploy a cluster on
15-
virtualized or cloud environments, you must be aware of additional
16-
considerations for non-bare metal platforms. Review the information in the
17-
link:https://access.redhat.com/articles/4207611[guidelines for deploying {product-title} on non-tested platforms]
18-
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.
1915
====
2016

2117
== Prerequisites
@@ -29,6 +25,7 @@ before you attempt to install an {product-title} cluster in such an environment.
2925
Be sure to also review this site list if you are configuring a proxy.
3026
====
3127

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

3431
[role="_additional-resources"]
@@ -44,8 +41,10 @@ of the required machines.
4441

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

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

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

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

8786
* 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]
8887

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

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

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

109110
[role="_additional-resources"]
@@ -118,6 +119,7 @@ include::modules/installation-infrastructure-user-infra.adoc[leveloffset=+1]
118119
* 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]
119120
* 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]
120121

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

123125
[role="_additional-resources"]
@@ -126,23 +128,28 @@ include::modules/installation-user-provisioned-validating-dns.adoc[leveloffset=+
126128
* xref:../../../installing/installing_bare_metal/upi/installing-bare-metal.adoc#installation-dns-user-infra_installing-bare-metal[User-provisioned DNS requirements]
127129
* 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]
128130

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

131134
[role="_additional-resources"]
132135
.Additional resources
133136

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

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

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

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

142148
[role="_additional-resources"]
143149
.Additional resources
144150
* xref:../../../installing/installing_bare_metal/upi/installation-config-parameters-bare-metal.adoc#installation-config-parameters-bare-metal[Installation configuration parameters for bare metal]
145151

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

148155
[role="_additional-resources"]

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

Lines changed: 56 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ As an alternative to using the `configure-ovs.sh` shell script to set a `br-ex`
1919
endif::postinstall-bare-metal[]
2020

2121
ifdef::postinstall-bare-metal[]
22-
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.
22+
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.
23+
24+
The Kubernetes NMState Operator uses the NMState configuration file to create a customized `br-ex` bridge network configuration on each node in your cluster.
2325

2426
[IMPORTANT]
2527
====
@@ -87,11 +89,11 @@ ifndef::postinstall-bare-metal[]
8789
[source,yaml]
8890
----
8991
interfaces:
90-
- name: enp2s0 <1>
91-
type: ethernet <2>
92-
state: up <3>
92+
- name: enp2s0
93+
type: ethernet
94+
state: up
9395
ipv4:
94-
enabled: false <4>
96+
enabled: false
9597
ipv6:
9698
enabled: false
9799
- name: br-ex
@@ -107,7 +109,7 @@ interfaces:
107109
options:
108110
mcast-snooping-enable: true
109111
port:
110-
- name: enp2s0 <5>
112+
- name: enp2s0
111113
- name: br-ex
112114
- name: br-ex
113115
type: ovs-interface
@@ -116,27 +118,33 @@ interfaces:
116118
ipv4:
117119
enabled: true
118120
dhcp: true
119-
auto-route-metric: 48 <6>
121+
auto-route-metric: 48
120122
ipv6:
121123
enabled: true
122124
dhcp: true
123125
auto-route-metric: 48
124126
# ...
125127
----
126-
<1> Name of the interface.
127-
<2> The type of ethernet.
128-
<3> The requested state for the interface after creation.
129-
<4> Disables IPv4 and IPv6 in this example.
130-
<5> The node NIC to which the bridge attaches.
131-
<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.
128+
+
129+
where:
130+
+
131+
`interfaces.name`:: Name of the interface.
132+
`interfaces.type`:: The type of ethernet.
133+
`interfaces.state`:: The requested state for the interface after creation.
134+
`ipv4.enabled`:: Disables IPv4 and IPv6 in this example.
135+
`port.name`:: The node NIC to which the bridge attaches.
136+
`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.
132137

133138
. Use the `cat` command to base64-encode the contents of the NMState configuration:
134139
+
135140
[source,terminal]
136141
----
137-
$ cat <nmstate_configuration>.yaml | base64 <1>
142+
$ cat <nmstate_configuration>.yml | base64
138143
----
139-
<1> Replace `<nmstate_configuration>` with the name of your NMState resource YAML file.
144+
+
145+
where:
146+
+
147+
`<nmstate_configuration>`:: Replace `<nmstate_configuration>` with the name of your NMState resource YAML file.
140148

141149
. Create a `MachineConfig` manifest file and define a customized `br-ex` bridge network configuration analogous to the following example:
142150
+
@@ -147,28 +155,31 @@ kind: MachineConfig
147155
metadata:
148156
labels:
149157
machineconfiguration.openshift.io/role: worker
150-
name: 10-br-ex-worker <1>
158+
name: 10-br-ex-worker
151159
spec:
152160
config:
153161
ignition:
154162
version: 3.2.0
155163
storage:
156164
files:
157165
- contents:
158-
source: data:text/plain;charset=utf-8;base64,<base64_encoded_nmstate_configuration> <2>
166+
source: data:text/plain;charset=utf-8;base64,<base64_encoded_nmstate_configuration>
159167
mode: 0644
160168
overwrite: true
161-
path: /etc/nmstate/openshift/worker-0.yml <3>
169+
path: /etc/nmstate/openshift/worker-0.yml
162170
- contents:
163171
source: data:text/plain;charset=utf-8;base64,<base64_encoded_nmstate_configuration>
164172
mode: 0644
165173
overwrite: true
166-
path: /etc/nmstate/openshift/worker-1.yml <3>
174+
path: /etc/nmstate/openshift/worker-1.yml
167175
# ...
168176
----
169-
<1> The name of the policy.
170-
<2> Writes the encoded base64 information to the specified path.
171-
<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.
177+
+
178+
where:
179+
+
180+
`metadata.name`:: The name of the policy.
181+
`contents.source`:: Writes the encoded base64 information to the specified path.
182+
`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.
172183
+
173184
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:
174185
+
@@ -192,32 +203,29 @@ $ oc apply -f <machine_config>.yml
192203
endif::postinstall-bare-metal[]
193204

194205
ifdef::postinstall-bare-metal[]
195-
* 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.
206+
* 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.
196207
+
197208
[IMPORTANT]
198209
====
199-
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.
200-
201-
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.
210+
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.
202211
====
203212
+
204-
.Example of an NNCP CR that sets IPv6 and IPv4 masquerade IP addresses
205213
[source,yaml]
206214
----
207215
apiVersion: nmstate.io/v1
208216
kind: NodeNetworkConfigurationPolicy
209217
metadata:
210-
name: worker-0-br-ex <1>
218+
name: worker-0-br-ex
211219
spec:
212220
nodeSelector:
213221
kubernetes.io/hostname: worker-0
214222
desiredState:
215223
interfaces:
216-
- name: enp2s0 <2>
217-
type: ethernet <3>
218-
state: up <4>
224+
- name: enp2s0
225+
type: ethernet
226+
state: up
219227
ipv4:
220-
enabled: false <5>
228+
enabled: false
221229
ipv6:
222230
enabled: false
223231
- name: br-ex
@@ -233,7 +241,7 @@ spec:
233241
options:
234242
mcast-snooping-enable: true
235243
port:
236-
- name: enp2s0 <6>
244+
- name: enp2s0
237245
- name: br-ex
238246
- name: br-ex
239247
type: ovs-interface
@@ -242,26 +250,30 @@ spec:
242250
ipv4:
243251
enabled: true
244252
dhcp: true
245-
auto-route-metric: 48 <7>
253+
auto-route-metric: 48
246254
address:
247-
- ip: "169.254.169.2"
248-
prefix-length: 29
255+
- ip: "169.254.0.2"
256+
prefix-length: 17
249257
ipv6:
250258
enabled: true
251259
dhcp: true
252260
auto-route-metric: 48
253261
address:
254262
- ip: "fd69::2"
255-
prefix-length: 125
263+
prefix-length: 112
256264
# ...
257265
----
258-
<1> Name of the policy.
259-
<2> Name of the interface.
260-
<3> The type of ethernet.
261-
<4> The requested state for the interface after creation.
262-
<5> Disables IPv4 and IPv6 in this example.
263-
<6> The node NIC to which the bridge is attached.
264-
<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.
266+
+
267+
where:
268+
+
269+
`metadata.name`:: Name of the policy.
270+
`interfaces.name`:: Name of the interface.
271+
`interfaces.type`:: The type of ethernet.
272+
`interfaces.state`:: The requested state for the interface after creation.
273+
`ipv4.enabled`:: Disables IPv4 and IPv6 in this example.
274+
`port.name`:: The node NIC to which the bridge is attached.
275+
`address.ip`:: Shows the default IPv4 and IPv6 IP addresses. Ensure that you set the masquerade IPv4 and IPv6 IP addresses of your network.
276+
`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.
265277
endif::postinstall-bare-metal[]
266278

267279
.Next steps

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

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

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

139-
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.
139+
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.
140140

141141
[NOTE]
142142
====
@@ -148,7 +148,7 @@ Before {product-title} 4.12, the cluster installation program only accepted an I
148148

149149
| `ingressVIPs` | a| (Optional) The virtual IP address for ingress traffic.
150150

151-
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.
151+
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.
152152

153153
[NOTE]
154154
====

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)