Bug 2082045

Summary: Support custom value for IP field addr-gen-mode
Product: Red Hat Enterprise Linux 9 Reporter: Quique Llorente <ellorent>
Component: nmstateAssignee: Gris Ge <fge>
Status: CLOSED ERRATA QA Contact: Mingyu Shi <mshi>
Severity: high Docs Contact: Marc Muehlfeld <mmuehlfe>
Priority: high    
Version: 9.1CC: ferferna, fge, jiji, jishi, mshi, network-qe, sfaye, till
Target Milestone: rcKeywords: Triaged
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
For the release note, see the Doc Text field in BZ#2082043.
Story Points: ---
Clone Of: 2082044 Environment:
Last Closed: 2022-11-15 10:00:45 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 Quique Llorente 2022-05-05 09:51:50 UTC
Description of problem:

As part of migration MCO configure-ovs to nmstate the attribute "addr-gen-mode" need to be set if interfaces has already a address assigned [1]

[1] https://github.com/openshift/machine-config-operator/blob/48d88a7f75e97c87b2a6f4b00862a091fccbdd72/templates/common/_base/files/configure-ovs-network.yaml#L327


Version-Release number of selected component (if applicable):


How reproducible: Always


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:
User can set the "addr-gen-mode" attribute at thir ipv4/ipv6 field options.


Additional info:

Comment 1 sfaye 2022-05-17 12:30:16 UTC
Hi @ellorent,

Could you please provide an acceptance criteria for this request so that we know clearly what we will need to do ? 


Thanks,

Comment 2 Quique Llorente 2022-05-18 09:18:09 UTC
@sfaye at some scenarios the attribtue need to be copied to the bridge from the ports, adding this attribute to nmstate allows us to do it with it.


https://github.com/qinqon/configure-ovs-nmstate/blob/main/configure-ovs.sh#L292-L294

Comment 5 Gris Ge 2022-05-25 04:54:32 UTC
Patch posted to https://github.com/nmstate/nmstate/pull/1906

Example yaml:

```yaml
---
interfaces:
  - name: eth1
    type: ethernet
    state: up
    mtu: 1500
    ipv4:
      enabled: false
    ipv6:
      autoconf: true
      dhcp: true
      enabled: true
      addr-gen-mode: eui64
```

Supporting two modes: `eui64` for RFC 4862, `stable-privacy` for RFC 7217.

Comment 6 Fernando F. Mancera 2022-06-01 11:02:02 UTC
Tested with integration tests and manually!

Comment 9 Mingyu Shi 2022-06-15 05:41:12 UTC
Verified with:
nmstate-2.1.1-0.alpha.20220602.5accbd1.el9.x86_64
NetworkManager-1.39.6-1.el9.x86_64

The log: https://bugzilla.redhat.com/attachment.cgi?id=1890087

Comment 11 errata-xmlrpc 2022-11-15 10:00:45 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 (nmstate 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:7991