Skip to content
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

Configure bond0 interface (alternative implementation) #22

Merged
merged 3 commits into from
Jun 27, 2022

Conversation

larsks
Copy link
Member

@larsks larsks commented Jun 25, 2022

This is an alternative implementation of #20.

We want to use bonded interface pairs on these system. The nodes
aren't yet wired for it, but setting this up now will allow us to
refer to the bond0 interface in e.g. VLAN configurations (and means
we won't have to re-work those later).

Because we're using OVNKubernetes, we can't use nmstate 1 to enact
the configuration. The recommended mechanism for modifying the primary
interface configuration is to apply the configuration using a
MachineConfig 2 resource.

Despite having identical PCI configurations, ctl-0 has different
network device names than ctl-1 and ctl-2. By disabling "predictable
network interface names" 3, we end up with consistent device names
across the cluster.

By disabling predictable network interface names, we can
simply install NetworkManager connection files for bond0, eth2, and
eth3. This will take effect when the system reboots (which will happen
when the MachineConfig Operator applies our changes).

Despite having identical PCI configurations, ctl-0 has different
network device names than ctl-1 and ctl-2. By disabling "predictable
network interface names" [1], we end up with consistent device names
across the cluster.

This drastically simplifies the process of applying networking
configuration changes across the cluster.

[1]: https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/
We disabled predictable network device names in the previous commit,
which means we're now at the mercy of the order in which the kernel
scans network devices. If a card is added or removed from the system,
what we know as "eth2" may no longer be the same interface it is now.

To solve this, we add udev rules that match the network interfaces
based on characteristics such as their PCI bus/device/function.
@larsks larsks force-pushed the feature/bond0-beta branch 3 times, most recently from 13ffdd6 to 536d592 Compare June 26, 2022 02:13
We want to use bonded interface pairs on these system. The nodes
aren't yet wired for it, but setting this up now will allow us to
refer to the `bond0` interface in e.g. VLAN configurations (and means
we won't have to re-work those later).

Because we're using OVNKubernetes, we can't use nmstate [1] to enact
the configuration. The recommended mechanism for modifying the primary
interface configuration is to apply the configuration using a
MachineConfig [2] resource.

By taking advantage of the changes in the previous commits, we can
simply install NetworkManager connection files for bond0, nic1, and
nic2. This will take effect when the system reboots (which will happen
when the MachineConfig Operator applies our changes).

[1]: https://docs.openshift.com/container-platform/4.10/networking/k8s_nmstate/k8s-nmstate-about-the-k8s-nmstate-operator.html
[2]: https://docs.openshift.com/container-platform/4.10/post_installation_configuration/machine-configuration-tasks.html

x-branch: feature/bond0-beta
@larsks larsks force-pushed the feature/bond0-beta branch from 536d592 to 6771123 Compare June 26, 2022 02:17
Copy link
Contributor

@jtriley jtriley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but let's switch the LACP bond mode to 802.3ad

@larsks larsks force-pushed the feature/bond0-beta branch from 6771123 to 082e1fe Compare June 27, 2022 16:13
@jtriley jtriley merged commit c2fec59 into OCP-on-NERC:main Jun 27, 2022
@larsks larsks deleted the feature/bond0-beta branch June 27, 2022 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants