-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
prod: fix NIC device names via udev rules
Previously we had homogeneous worker node hardware, however, with the addition of 2x new NVIDIA V100 worker hosts this is no longer the case. These new hosts have different NIC devices than the rest of the worker nodes. This adds the following new machineconfigs in order to map all of the NICs in the cluster to nic1 and nic2 devices: - disable-net-ifnames - custom-udev-rules The configure-bond0 machineconfig has been updated to use nic1 and nic2 vs the old eno1 and eno2 device names. Previously, this machineconfig was only being applied on the worker nodes. This patch also extends that configuration to the controllers in order to setup an LACP bond on those hosts.
- Loading branch information
Showing
23 changed files
with
243 additions
and
15 deletions.
There are no files selected for viewing
This file contains 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
3 changes: 2 additions & 1 deletion
3
cluster-scope/overlays/nerc-ocp-prod/machineconfigs/configure-bond0/Makefile
This file contains 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
7 changes: 7 additions & 0 deletions
7
cluster-scope/overlays/nerc-ocp-prod/machineconfigs/configure-bond0/README.md
This file contains 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,7 @@ | ||
Including file content in ignition configs is a pain, because it has to be base64 encoded. The `Makefile` in this directory uses [Butane][] to transpile `MachineConfig` resources, automatically including and encoding content from files. | ||
|
||
Read "[Creating machine configs with Butane][]" in the [OpenShift documentation][] for more information. | ||
|
||
[butane]: https://coreos.github.io/butane/ | ||
[openshift documentation]: https://docs.openshift.com/container-platform/4.10/installing/install_config/installing-customizing.html | ||
[creating machine configs with butane]: https://docs.openshift.com/container-platform/4.10/installing/install_config/installing-customizing.html#installation-special-config-butane_installing-customizing |
28 changes: 28 additions & 0 deletions
28
cluster-scope/overlays/nerc-ocp-prod/machineconfigs/configure-bond0/bond0-controller.yaml
This file contains 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,28 @@ | ||
# Generated by Butane; do not edit | ||
apiVersion: machineconfiguration.openshift.io/v1 | ||
kind: MachineConfig | ||
metadata: | ||
labels: | ||
machineconfiguration.openshift.io/role: master | ||
name: configure-bond0-controller | ||
spec: | ||
config: | ||
ignition: | ||
version: 3.2.0 | ||
storage: | ||
files: | ||
- contents: | ||
compression: gzip | ||
source: data:;base64,H4sIAAAAAAAC/0zMwaqDMBCF4f15FyXeKxfvYp5EskiTKQY6M6IToW9fLEK7O/BzvjmbKmevphG10M20BPhz5fdEVeftnjJ3moSvnJrb9SPfGuOD9F+t2x/p4J0GYGZfeFP2CPFG/yEEYD61CLHCNIWf/jcVSK1iSsN49roeY4SwL1bohFGWvHZeha05TX9jCHgFAAD///WlE5PCAAAA | ||
mode: 384 | ||
path: /etc/NetworkManager/system-connections/bond0.nmconnection | ||
- contents: | ||
compression: "" | ||
source: data:,%5Bconnection%5D%0Aid%3Dnic1%0Atype%3Dethernet%0Ainterface-name%3Dnic1%0Amaster%3Dbond0%0Aslave-type%3Dbond%0Aautoconnect%3Dtrue%0A%0A%5Bethernet%5D%0Amtu%3D9000%0A | ||
mode: 384 | ||
path: /etc/NetworkManager/system-connections/nic1.nmconnection | ||
- contents: | ||
compression: "" | ||
source: data:,%5Bconnection%5D%0Aid%3Dnic2%0Atype%3Dethernet%0Ainterface-name%3Dnic2%0Amaster%3Dbond0%0Aslave-type%3Dbond%0Aautoconnect%3Dtrue%0A%0A%5Bethernet%5D%0Amtu%3D9000%0A | ||
mode: 384 | ||
path: /etc/NetworkManager/system-connections/nic2.nmconnection |
This file contains 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
3 changes: 2 additions & 1 deletion
3
cluster-scope/overlays/nerc-ocp-prod/machineconfigs/configure-bond0/kustomization.yaml
This file contains 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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
resources: | ||
- machineconfig.yaml | ||
- bond0-controller.yaml | ||
- bond0-worker.yaml |
20 changes: 20 additions & 0 deletions
20
cluster-scope/overlays/nerc-ocp-prod/machineconfigs/configure-bond0/src/bond0-controller.bu
This file contains 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,20 @@ | ||
variant: openshift | ||
version: 4.10.0 | ||
metadata: | ||
name: configure-bond0-controller | ||
labels: | ||
machineconfiguration.openshift.io/role: master | ||
storage: | ||
files: | ||
- path: /etc/NetworkManager/system-connections/bond0.nmconnection | ||
mode: 0600 | ||
contents: | ||
local: bond0.nmconnection | ||
- path: /etc/NetworkManager/system-connections/nic1.nmconnection | ||
mode: 0600 | ||
contents: | ||
local: nic1.nmconnection | ||
- path: /etc/NetworkManager/system-connections/nic2.nmconnection | ||
mode: 0600 | ||
contents: | ||
local: nic2.nmconnection |
20 changes: 20 additions & 0 deletions
20
cluster-scope/overlays/nerc-ocp-prod/machineconfigs/configure-bond0/src/bond0-worker.bu
This file contains 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,20 @@ | ||
variant: openshift | ||
version: 4.10.0 | ||
metadata: | ||
name: configure-bond0-worker | ||
labels: | ||
machineconfiguration.openshift.io/role: worker | ||
storage: | ||
files: | ||
- path: /etc/NetworkManager/system-connections/bond0.nmconnection | ||
mode: 0600 | ||
contents: | ||
local: bond0.nmconnection | ||
- path: /etc/NetworkManager/system-connections/nic1.nmconnection | ||
mode: 0600 | ||
contents: | ||
local: nic1.nmconnection | ||
- path: /etc/NetworkManager/system-connections/nic2.nmconnection | ||
mode: 0600 | ||
contents: | ||
local: nic2.nmconnection |
This file contains 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
4 changes: 2 additions & 2 deletions
4
...igs/configure-bond0/src/eno1.nmconnection → ...igs/configure-bond0/src/nic1.nmconnection
This file contains 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
4 changes: 2 additions & 2 deletions
4
...igs/configure-bond0/src/eno2.nmconnection → ...igs/configure-bond0/src/nic2.nmconnection
This file contains 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
13 changes: 13 additions & 0 deletions
13
cluster-scope/overlays/nerc-ocp-prod/machineconfigs/disable-net-ifnames/controller.yaml
This file contains 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,13 @@ | ||
apiVersion: machineconfiguration.openshift.io/v1 | ||
kind: MachineConfig | ||
metadata: | ||
name: disable-net-ifnames-controller | ||
labels: | ||
machineconfiguration.openshift.io/role: master | ||
spec: | ||
config: | ||
ignition: | ||
version: 3.2.0 | ||
kernelArguments: | ||
- net.ifnames=0 | ||
- biosdevname=0 |
5 changes: 5 additions & 0 deletions
5
cluster-scope/overlays/nerc-ocp-prod/machineconfigs/disable-net-ifnames/kustomization.yaml
This file contains 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,5 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
resources: | ||
- controller.yaml | ||
- worker.yaml |
13 changes: 13 additions & 0 deletions
13
cluster-scope/overlays/nerc-ocp-prod/machineconfigs/disable-net-ifnames/worker.yaml
This file contains 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,13 @@ | ||
apiVersion: machineconfiguration.openshift.io/v1 | ||
kind: MachineConfig | ||
metadata: | ||
name: disable-net-ifnames-worker | ||
labels: | ||
machineconfiguration.openshift.io/role: worker | ||
spec: | ||
config: | ||
ignition: | ||
version: 3.2.0 | ||
kernelArguments: | ||
- net.ifnames=0 | ||
- biosdevname=0 |
11 changes: 11 additions & 0 deletions
11
cluster-scope/overlays/nerc-ocp-prod/machineconfigs/udev-rules/Makefile
This file contains 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,11 @@ | ||
MACHINECONFIGS = \ | ||
custom-udev-rules-controller.yaml \ | ||
custom-udev-rules-worker.yaml | ||
|
||
%.yaml: src/%.bu | ||
butane -o $@ -d src $< | ||
|
||
all: $(MACHINECONFIGS) | ||
|
||
clean: | ||
rm -f $(MACHINECONFIGS) |
28 changes: 28 additions & 0 deletions
28
...-scope/overlays/nerc-ocp-prod/machineconfigs/udev-rules/custom-udev-rules-controller.yaml
This file contains 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,28 @@ | ||
# Generated by Butane; do not edit | ||
apiVersion: machineconfiguration.openshift.io/v1 | ||
kind: MachineConfig | ||
metadata: | ||
labels: | ||
machineconfiguration.openshift.io/role: master | ||
name: custom-udev-rules-controller | ||
spec: | ||
config: | ||
ignition: | ||
version: 3.2.0 | ||
storage: | ||
files: | ||
- contents: | ||
compression: gzip | ||
source: data:;base64,H4sIAAAAAAAC/woOdQqODA5x9bW1VcpLLVHScQnyDHMNCra1VcrNqTCNT84vSlXS8XYN8nP1AQkaGBgYWBmYWRkY6Bko6Tg6h3j6+9naKiWmpCjp+Dn6utoq5WUmGypxUWCuIU5zjZS4AAEAAP//AAlzT7AAAAA= | ||
mode: 420 | ||
path: /etc/udev/rules.d/90-mlx5-core.rules | ||
- contents: | ||
compression: gzip | ||
source: data:;base64,H4sIAAAAAAAC/woOdQqODA5x9bW1VcpLLVHScQnyDHMNCra1VUrKqzCqUNLxdg3yc/UBCRgYGBhYGRhaGRjoGSjpODqHePr72doqJaakKOn4Ofq62irlZSYbKnGRaaYhTjONlLgAAQAA//9tGntmqAAAAA== | ||
mode: 420 | ||
path: /etc/udev/rules.d/90-bnx2x.rules | ||
- contents: | ||
compression: gzip | ||
source: data:;base64,H4sIAAAAAAAC/woOdQqODA5x9bW1VcpLLVHScQnyDHMNCra1VUrKqyiJT81T0vF2DfJz9QEJGRgYGFgZWlgZGOgZKOk4Ood4+vvZ2iolpqQo6fg5+rraKuVlJhsqcZFtqiFOU42UuAABAAD//64yhGWsAAAA | ||
mode: 420 | ||
path: /etc/udev/rules.d/90-bnxt_en.rules |
28 changes: 28 additions & 0 deletions
28
cluster-scope/overlays/nerc-ocp-prod/machineconfigs/udev-rules/custom-udev-rules-worker.yaml
This file contains 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,28 @@ | ||
# Generated by Butane; do not edit | ||
apiVersion: machineconfiguration.openshift.io/v1 | ||
kind: MachineConfig | ||
metadata: | ||
labels: | ||
machineconfiguration.openshift.io/role: worker | ||
name: custom-udev-rules-worker | ||
spec: | ||
config: | ||
ignition: | ||
version: 3.2.0 | ||
storage: | ||
files: | ||
- contents: | ||
compression: gzip | ||
source: data:;base64,H4sIAAAAAAAC/woOdQqODA5x9bW1VcpLLVHScQnyDHMNCra1VcrNqTCNT84vSlXS8XYN8nP1AQkaGBgYWBmYWRkY6Bko6Tg6h3j6+9naKiWmpCjp+Dn6utoq5WUmGypxUWCuIU5zjZS4AAEAAP//AAlzT7AAAAA= | ||
mode: 420 | ||
path: /etc/udev/rules.d/90-mlx5-core.rules | ||
- contents: | ||
compression: gzip | ||
source: data:;base64,H4sIAAAAAAAC/woOdQqODA5x9bW1VcpLLVHScQnyDHMNCra1VUrKqzCqUNLxdg3yc/UBCRgYGBhYGRhaGRjoGSjpODqHePr72doqJaakKOn4Ofq62irlZSYbKnGRaaYhTjONlLgAAQAA//9tGntmqAAAAA== | ||
mode: 420 | ||
path: /etc/udev/rules.d/90-bnx2x.rules | ||
- contents: | ||
compression: gzip | ||
source: data:;base64,H4sIAAAAAAAC/woOdQqODA5x9bW1VcpLLVHScQnyDHMNCra1VUrKqyiJT81T0vF2DfJz9QEJGRgYGFgZWlgZGOgZKOk4Ood4+vvZ2iolpqQo6fg5+rraKuVlJhsqcZFtqiFOU42UuAABAAD//64yhGWsAAAA | ||
mode: 420 | ||
path: /etc/udev/rules.d/90-bnxt_en.rules |
5 changes: 5 additions & 0 deletions
5
cluster-scope/overlays/nerc-ocp-prod/machineconfigs/udev-rules/kustomization.yaml
This file contains 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,5 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
resources: | ||
- custom-udev-rules-controller.yaml | ||
- custom-udev-rules-worker.yaml |
2 changes: 2 additions & 0 deletions
2
cluster-scope/overlays/nerc-ocp-prod/machineconfigs/udev-rules/src/bnx2x.rules
This file contains 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,2 @@ | ||
SUBSYSTEM=="net",DRIVERS=="bnx2x",KERNELS=="0000:01:00.0",ACTION=="add",NAME="nic1" | ||
SUBSYSTEM=="net",DRIVERS=="bnx2x",KERNELS=="0000:01:00.1",ACTION=="add",NAME="nic2" |
2 changes: 2 additions & 0 deletions
2
cluster-scope/overlays/nerc-ocp-prod/machineconfigs/udev-rules/src/bnxt_en.rules
This file contains 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,2 @@ | ||
SUBSYSTEM=="net",DRIVERS=="bnxt_en",KERNELS=="0000:18:00.0",ACTION=="add",NAME="nic1" | ||
SUBSYSTEM=="net",DRIVERS=="bnxt_en",KERNELS=="0000:18:00.1",ACTION=="add",NAME="nic2" |
20 changes: 20 additions & 0 deletions
20
...cope/overlays/nerc-ocp-prod/machineconfigs/udev-rules/src/custom-udev-rules-controller.bu
This file contains 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,20 @@ | ||
variant: openshift | ||
version: 4.10.0 | ||
metadata: | ||
name: custom-udev-rules-controller | ||
labels: | ||
machineconfiguration.openshift.io/role: master | ||
storage: | ||
files: | ||
- path: /etc/udev/rules.d/90-mlx5-core.rules | ||
contents: | ||
local: mlx5_core.rules | ||
mode: 0644 | ||
- path: /etc/udev/rules.d/90-bnx2x.rules | ||
contents: | ||
local: bnx2x.rules | ||
mode: 0644 | ||
- path: /etc/udev/rules.d/90-bnxt_en.rules | ||
contents: | ||
local: bnxt_en.rules | ||
mode: 0644 |
20 changes: 20 additions & 0 deletions
20
...er-scope/overlays/nerc-ocp-prod/machineconfigs/udev-rules/src/custom-udev-rules-worker.bu
This file contains 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,20 @@ | ||
variant: openshift | ||
version: 4.10.0 | ||
metadata: | ||
name: custom-udev-rules-worker | ||
labels: | ||
machineconfiguration.openshift.io/role: worker | ||
storage: | ||
files: | ||
- path: /etc/udev/rules.d/90-mlx5-core.rules | ||
contents: | ||
local: mlx5_core.rules | ||
mode: 0644 | ||
- path: /etc/udev/rules.d/90-bnx2x.rules | ||
contents: | ||
local: bnx2x.rules | ||
mode: 0644 | ||
- path: /etc/udev/rules.d/90-bnxt_en.rules | ||
contents: | ||
local: bnxt_en.rules | ||
mode: 0644 |
2 changes: 2 additions & 0 deletions
2
cluster-scope/overlays/nerc-ocp-prod/machineconfigs/udev-rules/src/mlx5_core.rules
This file contains 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,2 @@ | ||
SUBSYSTEM=="net",DRIVERS=="mlx5_core",KERNELS=="0000:06:00.0",ACTION=="add",NAME="nic1" | ||
SUBSYSTEM=="net",DRIVERS=="mlx5_core",KERNELS=="0000:06:00.1",ACTION=="add",NAME="nic2" |