-
Notifications
You must be signed in to change notification settings - Fork 519
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
Move primary interface sysctl config to netdog #2144
Conversation
eth0
specific sysctls to default settings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What takes care of applying the equivalent of this change to the primary interface on metal hosts? It feels kind of rough to expect the admin to discover they also need to add these sysctl settings.
Since we have the concept of primary interface in netdog
now, I'd prefer letting netdog
own this via a new oneshot service that runs at the right point in the boot sequence: after /proc/sys/net/ipv4/conf/<primary>
exists; before settings are applied so that sysctl settings can still be used to override the defaults.
eth0
specific sysctls to default settingsThis renames var-run-tmpfiles to systemd-tmpfiles to better match convention in our other packages.
This adds a line to `systemd-tmpfiles` to ensure that the `/etc/sysctl.d` directory is created at boot.
eth0 is not the default interface for all variants any longer. This change removes the hardcoded `eth0` specific sysctls from default settings. `netdog` is now responsible for setting these default sysctls for whatever the primary interface is for the platform. In order to do this, a new subcommand `prepare-primary-interface` is added to `netdog` and run via a oneshot service. The command reads the primary interace from file (previously generated by `netdog`) and writes the sysctls for that interface to file in `/etc/sysctl.d`. It then executes `systemd-sysctl`, which sets these sysctls. Since all of this happens early in boot, a user is able to override these via API settings as usual.
^ Fixes per @bcressey 's suggestions |
Description of changes:
Testing done:
Boot
aws-k8s-1.19
,aws-k8s-1.22
, andmetal-dev
and ensure the sysctl file is written and sysctls are set: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.