-
Notifications
You must be signed in to change notification settings - Fork 510
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: set IPv6 accept-ra for primary interface via config rather than sysctl #3159
Conversation
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.
Changes look good, and coverage appears thorough enough.
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.
LGTM overall, but if you have a chance to clean up the commits so that all the necessary modifications to wicked/mod.rs
happen together, that seems like a more logical sequence.
This change adds the necessary structures to wicked in order to support setting the `accept_ra` IPv6 option via interface config. Doing this in config allows wicked to manage this option and avoids any race conditions that may occur between wicked and the kernel when attempting to set this via sysctl.
Previously, we set the IPv6 accept-ra setting for the primary interface via `systemd-sysctl` during the wicked install helper. Setting this sysctl via the helper can cause a race condition between the kernel and wicked. The kernel sets a flag indicating a router advertisement has been received (`IF_RA_RCVD`), but only after it completes duplicate address detection and decides whether to send a router solicitation. If the sysctl isn't set by the time duplicate address detection completes, the solicitation doesn't happen and the `IF_RA_RCVD` flag doesn't get set. wicked uses this flag to decide whether or not to kick off the state machine that handles DHCP6. This change adds the accept-ra setting to the interface config if the primary interface is set up via kernel command line. The primary interface is supplied via kernel command line for AWS and VMware variants. This change also removes the accept-ra setting from the `systemd-sysctl` config. Allowing wicked to manage this setting eliminates any chance of races between sysctl/kernel/wicked.
^ Fixed up the commits per @bcressey |
Issue number:
Related to #3143
A separate PR will be opened by @markusboehme for the related patches to
wicked
Description of changes:
In the future we will support a network config setting that sets this in config for any interface specified.
Testing done:
wicked
patches (thanks @markusboehme! ) into an IPv6 EKS cluster. Observe all instances join the cluster, indicating they all received an IPv6 address successfully.aws-k8s-1.24
instance into a "normal" IPv4 cluster successfully.vmware-k8s-1.24
VM and observe it join my cluster successfully.eth0
:systemd-sysctl
and from wickedTerms 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.