-
Notifications
You must be signed in to change notification settings - Fork 883
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
NM renderer: set default IPv6 addr-gen-mode for all interfaces to EUI64 #4291
Conversation
ani-sinha
commented
Jul 25, 2023
•
edited
Loading
edited
|
@blackboxsw any suggestions for this? |
@ani-sinha The proposal makes sense to me. My only concern at this point would be backwards compatibility with what we have already released. The BZ says Is this something that can be fixed in NetworkManager? It's kind of strange that |
This request came from our NM team directly so let me reach out to them. They maintain NM and know more about the behavior than me. |
It's not disto-specific. NetworkManager avoids doing disto-specific stuff.
If you write a keyfile (to The meaning of "default" is to lookup global connection defaults in NetworkManager.conf, and if unspecified, fallback to "stable-privacy". The meaning of "default-or-eui64" is to lookup global connection defaults and fallback to "eui64". cloud-init creates profiles by writing them to disk. It does not specifiy the addr-gen-mode in the file, consequently it gets Later, on such a system, if the user types "stable-privacy" has various benefits, in particular it can generate another address when it detects an address conflict. It works not great for certain users, who expect to anticipate (know in advance) the IPv6 address -- which they could with EUI64. So on a system where a user uses cloud-init, we assume the user would prefer EUI64. The branch achieves that by changing the default in NetworkManager. Note that a user can still override this either per-profile (by setting
Note that the profile explicitly created by cloud-init already get
Although it's odd, there is nothing to fix. It's just, the default differs depending on whether you create files or whether the profiles are created via other means (D-Bus, libnm, nmcli, autogenerated "Wired connection 1"). That is to support backward compatibility, where old files are still treated as in the past, when only EUI64 is used while the rest of NetworkManager prefers to default to "stable-privacy". In particular with this pull-request, "cloud-init" overrides NetworkManager's preferred default of "stable-privacy" to use EUI64. There simply is no default that suits all cases optimally, so I think cloud-init overriding the default makes sense, as we possibly run in an environment where EUI64 is better (cloud??). |
@thom311 , thanks for the additional context. That helps a lot. Given your explanation, I agree that this change makes the most sense. @ani-sinha , feel free to continue with the current PR. |
By default, NetworkManager renderer in cloud-init does not set any specific method for IPV6 addr-gen-mode in the keyfiles it writes. Hence, implicitly the mode is set to `eui64` in the absence of any global addr-gen-mode option in NetworkManager configuration. Later when other interfaces get added via D-Bus API or by using nmcli commands without explictly setting an addr-gen-mode, NM auto generates new profiles for those interfaces with addr-gen-mode set to `stable-privacy`. This introduces inconsistency of configurations between interfaces based on how they were added. This can cause problems for the customers. In this change, cloud-init overrides NetworkManager's preferred default of `stable-privacy` to use EUI64 using a drop in NetworkManager configuration file. This setting can be overriden by using global-connection-defaults setting in /etc/NetworkManager/NetworkManager.conf file. RHBZ: 2188388 Signed-off-by: Ani Sinha <anisinha@redhat.com>
Fixed the unit tests. |
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!