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

Switch to systemd-networkd as a replacement for wicked #2449

Closed
zmrow opened this issue Sep 23, 2022 · 4 comments
Closed

Switch to systemd-networkd as a replacement for wicked #2449

zmrow opened this issue Sep 23, 2022 · 4 comments
Assignees
Labels
area/core Issues core to the OS (variant independent) status/in-progress This issue is currently being worked on

Comments

@zmrow
Copy link
Contributor

zmrow commented Sep 23, 2022

What I'd like:
I'd like to move to systemd-networkd to streamline dependencies and provide a more familiar networking stack for users.

Bottlerocket switched to wicked in the early stages of the project. A few things have changed since then and some aspects of that PR aren't applicable anymore.

Any alternatives you've considered:
Continue using wicked and keep the status quo

@zmrow zmrow self-assigned this Sep 23, 2022
@zmrow zmrow added the area/core Issues core to the OS (variant independent) label Sep 26, 2022
@stmcginnis stmcginnis added the status/needs-triage Pending triage or re-evaluation label Dec 1, 2022
@zmrow zmrow added status/research This issue is being researched and removed status/needs-triage Pending triage or re-evaluation labels Dec 1, 2022
@zmrow zmrow changed the title Evaluate systemd-networkd as a replacement for wicked Switch to systemd-networkd as a replacement for wicked Dec 1, 2022
@zmrow
Copy link
Contributor Author

zmrow commented Dec 1, 2022

Our main goal for this change is to make the switch as invisible as possible to the user. Ideally, no one should even notice the switch happened. This means there can be no functionality loss. It also means we will continue to support all current network config versions.

While the change to systemd-networkd opens the door for more networking-related features, we won't be adding any new features as part of this switch. We will make the switch to systemd-networkd first, and add features later.

Tasks list (subject to update and change):

  • Add systemd-networkd to the tree.
    • Add networkd as a subpackage of systemd
    • Add a build flag to enable the use of systemd-networkd in any variant.
    • Evaluate networkd-related packages from the above PR to determine if they are still necessary
  • Implement networkd config file generation in netdog
  • Implement the "optional lease" behavior wicked provides. (interface config for systemd-networkd-wait-online.service?)
    - [ ] Implement a helper to run on interface initialization and DHCP lease renewal (DBUS listener?) This rewrites current_ip and resolv.conf (WIP: @yeazelm )
    - [ ] Handle DNS settings - read from networkd lease (WIP: @yeazelm)
  • Integrate systemd-resolved
  • Handle sysctls for primary interface (if necessary)
  • Evaluate any new SELinux rules that might be necessary
  • Analyze and lock down the DBUS policy (via DBUS policy rules and/or SELinux rules). Figure out polkit's permissions and lock them down if necessary. Additional resources: One, Two, Three, Four
  • Patch out references to unused components or dbus services like hostnamed

@zmrow
Copy link
Contributor Author

zmrow commented Mar 22, 2023

Handle sysctls for primary interface (if necessary)

Mostly likely we'll end up handling these in the DBUS helper @yeazelm is working on. This is identical to the current behavior where the sysctls for the primary interface are set in the wicked install helper.

I had hopes we could handle it in networkd config, but we set the rp_filter sysctl for our primary interface and networkd doesn't currently allow setting this via config.

@zmrow
Copy link
Contributor Author

zmrow commented Sep 9, 2023

As referenced in #3366 , the team made the decision to integrate systemd-resolved instead of writing our own DBUS listener to respond to DHCP events and write a simple resolve.conf.

#3394 is open to flip the (not yet released) Kubernetes 1.28 and aws-ecs-2 variants to systemd-networkd. The *-dev variants are also being flipped in the same PR.

No user-facing changes related to networking will be necessary to use those variants!

@yeazelm
Copy link
Contributor

yeazelm commented Jan 12, 2024

We have completed the work to move to systemd-networkd for new variants (#3394). I'll close this issue and we can track any future work as bug or features since the migration is done and we don't plan to move existing variants to networkd.

@yeazelm yeazelm closed this as completed Jan 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/core Issues core to the OS (variant independent) status/in-progress This issue is currently being worked on
Projects
None yet
Development

No branches or pull requests

3 participants