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

netdog: Add BindCarrier to bond network files #3426

Merged
merged 2 commits into from
Sep 7, 2023

Conversation

yeazelm
Copy link
Contributor

@yeazelm yeazelm commented Sep 7, 2023

Issue number:

Closes #3425

Description of changes:
networkd will lose track of carrier for worker devices in a bond when bringing it up. This causes a delay in the bond becoming routable while the devices re-establish carrier status. This change adds BindCarrier to bond .network files which ensures networkd brings up the bond if at least one link has carrier.

Testing done:
This produces quicker boots and the bonds become routable quickly as expected:

[    2.816654] bond0: (slave enp0s17): Enslaving as a backup interface with an up link
[    2.817785] bond0: (slave enp0s16): Enslaving as a backup interface with an up link
[    3.055789] bond0: (slave enp0s17): link status definitely up, 0 Mbps full duplex
[    3.057791] bond0: (slave enp0s17): making interface the new active one
[    3.060579] bond0: active interface up!
[    3.061597] IPv6: ADDRCONF(NETDEV_CHANGE): bond0: link becomes ready
[    5.561715] ACPI: bus type drm_connector registered
[    6.076869] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    6.080478] Bridge firewalling registered
[    6.242966] Initializing XFRM netlink socket
[    6.618105] fbcon: Taking over console
[    6.619157] Console: switching to colour frame buffer device 160x50
[  207.715645] bond0: (slave enp0s16): link status definitely up, 0 Mbps full duplex
[  207.717310] bond0: (slave enp0s16): making interface the new active one

The backstop message still appears, but the network is useable well before this (fetched immediately after my metal-dev instance booted and provided a login prompt:

bash-5.1# networkctl
IDX LINK    TYPE     OPERATIONAL SETUP
  1 lo      loopback carrier     unmanaged
  2 enp0s16 ether    enslaved    configured
  3 enp0s17 ether    enslaved    configured
  4 bond0   bond     routable    configured
  5 docker0 bridge   no-carrier  unmanaged

5 links listed.

Tests were also updated to ensure this change shows up in the resulting configurations.

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

@yeazelm yeazelm requested review from zmrow and bcressey and removed request for zmrow September 7, 2023 16:22
networkd will lose track of carrier for worker devices in a bond when
bringing it up. This causes a delay in the bond becoming routable while
the devices re-establish carrier status. This change adds BindCarrier to
bond .network files which ensures networkd brings up the bond if at
least one link has carrier.

Signed-off-by: Matthew Yeazel <[email protected]>
We have added several new options for networkd .network files which
broke the tests. This updates the test files to reflect the new expected
state.
@yeazelm
Copy link
Contributor Author

yeazelm commented Sep 7, 2023

Updated the PR to resolve the conflict and added a commit for fixing the tests at the same time. Otherwise, the code is the same.

@yeazelm yeazelm merged commit a5200a1 into bottlerocket-os:develop Sep 7, 2023
48 checks passed
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.

Configuring bond devices with networkd results in long delay for configured status
3 participants