Bug 2082682

Summary: [RFE] support a ipv6.addr-gen-mode knob in the global config
Product: Red Hat Enterprise Linux 8 Reporter: Dusty Mabe <dustymabe>
Component: NetworkManagerAssignee: Thomas Haller <thaller>
Status: CLOSED ERRATA QA Contact: Matej Berezny <mberezny>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.6CC: acabral, bgalvani, cglombek, fpalin, lrintel, mircea.vutcovici, rkhan, rpawlik, sfaye, sukulkar, thaller, till, vbenes
Target Milestone: rcKeywords: FutureFeature, Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: NetworkManager-1.39.10-1.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-11-08 10:10:31 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Dusty Mabe 2022-05-06 18:27:59 UTC
Description of problem:

In *CoreOS we have seen complaints because in some cloud environments the wrong ipv6 address is shown to the user (the environment is expecting eui64 for address autoconfiguration). This is arguably a bug in the environment, but there are other reasons for wanting to disable `stable-privacy` mode globally for an instance or even at a vendor level (i.e. the Fedora CoreOS OpenStack image).

context: https://github.com/coreos/fedora-coreos-tracker/issues/907

Could we add support for configuring this in the global config?



Additional info:

This ticket came out of a meeting I had with some of the NetworkManager team members. It was requested I open a new ticket for the feature request.

A previous ticket describing a similar feature request is at 
https://bugzilla.redhat.com/show_bug.cgi?id=1743161

Comment 2 Dusty Mabe 2022-05-06 18:36:04 UTC
This is linked in the github issue but worth mentioning here:
https://docs.openstack.org/neutron/wallaby/admin/config-ipv6.html#configuring-interfaces-of-the-guest

Comment 4 Thomas Haller 2022-05-09 14:31:34 UTC
potential solution, on discussion here:
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1213

Comment 5 Thomas Haller 2022-06-29 06:22:30 UTC
addr-gen-mode is not configurable via global connection defaults.

See upstream commit https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/commit/e6a33c04ebe1ac84e31628911e25bdfd7534dd3c

Comment 6 Dusty Mabe 2022-06-29 14:54:47 UTC
Thomas,

Did you mean to say "addr-gen-mode is NOW configurable via global connection defaults"?

Comment 7 Thomas Haller 2022-06-29 18:31:28 UTC
(In reply to Dusty Mabe from comment #6)
> Thomas,
> 
> Did you mean to say "addr-gen-mode is NOW configurable via global connection
> defaults"?

yes.


  /etc/NetworkManager/conf.d/95-my.conf

with

  [connection-95-my]
  ipv6.addr-gen-mode=0

should work (0 is "eui64") -- if `nmcli connection show "$PROFILE"` either prints

  ipv6.addr-gen-mode=default
  ipv6.addr-gen-mode=default-or-eui64

(only in those two cases the fallback to the default happens)


-- of course, if you create a profile with D-Bus/nmcli it will default to "default", and if you omit the key from keyfile it will default to "default-or-eui64".


With a sufficiently recent nmcli that supports --offline, also test:

  $ nmcli --offline connection add type ethernet ipv6.addr-gen-mode 0

Comment 8 Thomas Haller 2022-06-29 18:35:51 UTC
> "is NOW configurable"

"NOW" being upstream `main` branch.

Btw, we have copr repos from upstream here: https://copr.fedorainfracloud.org/coprs/networkmanager/

Comment 17 errata-xmlrpc 2022-11-08 10:10:31 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (NetworkManager bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:7680