Bug 2137267

Summary: if ipv6 is enabled, nmstate cannot raise proper exception for MTU
Product: Red Hat Enterprise Linux 9 Reporter: Mingyu Shi <mshi>
Component: nmstateAssignee: Gris Ge <fge>
Status: CLOSED ERRATA QA Contact: Mingyu Shi <mshi>
Severity: medium Docs Contact:
Priority: low    
Version: 9.2CC: ferferna, jiji, jishi, network-qe, sfaye, till
Target Milestone: rcKeywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: nmstate-2.2.3-2.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-05-09 07:31:50 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:
Bug Depends On: 2044150    
Bug Blocks:    

Description Mingyu Shi 2022-10-24 09:48:49 UTC
Description of problem:
Refers to https://bugzilla.redhat.com/show_bug.cgi?id=2044150 , when ipv6 is enabled, the allowed minimum mtu is 1280, but when setting it to, for example, 1200, nmstate cannot friendly prompts and it raises the error at verification.

Version-Release number of selected component (if applicable):
nmstate-2.2.0-0.alpha.20221014.el9.x86_64
NetworkManager-1.40.0-1.el9.x86_64

How reproducible:
100%

Steps to Reproduce:
echo "interfaces:
  - name: veth0
    type: veth
    state: up
    ipv6:
      enabled: true
      address:
      - ip: 10::10
        prefix-length: 64
    veth:
      peer: veth0_p" | nmstatectl apply

nmstatectl show veth0 | grep min-mtu:  # min-mtu is 68

echo "interfaces:
  - name: veth0
    type: veth
    state: up
    ipv6:
      enabled: true
      address:
      - ip: 10::10
        prefix-length: 64
    mtu: 1200
    veth:
      peer: veth0_p" | nmstatectl apply

Actual results:
NmstateError: VerificationError: Verification failure: veth0.interface.mtu desire '1200', current '1280'

Expected results:
Raised a more user-fridenly exception like in https://bugzilla.redhat.com/show_bug.cgi?id=2044150

Ideally, if possible, when ipv6 is enabled, `min-mtu` in the output of `nmstatectl show` should show as 1280.

Additional info:

Comment 1 Gris Ge 2022-11-08 14:42:03 UTC
The min-mtu is hardware limitation at layer 2, it should not be impacted by layer 3(IP) status.

But yes, I will raise user friendly error message.

Comment 4 Gris Ge 2023-01-09 02:58:29 UTC
Patch posted to upstream: https://github.com/nmstate/nmstate/pull/2184

Comment 9 Mingyu Shi 2023-01-31 11:40:36 UTC
Verified with:
nmstate-2.2.5-1.el9.x86_64
nispor-1.2.9-1.el9.x86_64
NetworkManager-1.41.90-1.el9.x86_64
DISTRO=RHEL-9.2.0-20230127.12

Comment 11 errata-xmlrpc 2023-05-09 07:31:50 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-2023:2190