Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 2091457

Summary: Cannot apply route to host
Product: Red Hat Enterprise Linux 9 Reporter: Gris Ge <fge>
Component: nmstateAssignee: Gris Ge <fge>
Status: CLOSED ERRATA QA Contact: Mingyu Shi <mshi>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 9.1CC: ferferna, jiji, jishi, network-qe, till
Target Milestone: rcKeywords: Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: 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 Gris Ge 2022-05-30 01:57:45 UTC
Description of problem:

Nmstate fails when applying route to specific host (32 ipv4 prefix length or 128  prefix length)

Version-Release number of selected component (if applicable):
nmstate-2.1.1-0.alpha.20220519.437e4a9.el9

How reproducible:
100%

Steps to Reproduce:

echo '---
interfaces:
  - name: eth1
    type: ethernet
    state: up
    ipv4:
      enabled: true
      dhcp: false
      address:
      - ip: 192.0.2.251
        prefix-length: 24
    ipv6:
      enabled: true
      autoconf: false
      dhcp: false
      address:
      - ip: 2001:db8:2::1
        prefix-length: 64
routes:
  config:
  - destination: 203.0.113.1
    next-hop-interface: eth1' | sudo nmstatectl set

Actual results:

Failed to apply state

Expected results:

No failure.

Additional info:

Comment 1 Gris Ge 2022-07-20 09:48:32 UTC
Patch merged in upstream: https://github.com/nmstate/nmstate/pull/1971

Comment 4 Mingyu Shi 2022-08-09 09:08:44 UTC
Verified with:
nmstate-2.1.3-1.el9.x86_64
NetworkManager-1.39.10-1.el9.x86_64

echo '---
interfaces:
  - name: dummy1
    type: dummy
    state: up
    ipv4:
      enabled: true
      dhcp: false
      address:
      - ip: 192.0.2.251
        prefix-length: 24
    ipv6:
      enabled: true
      autoconf: false
      dhcp: false
      address:
      - ip: 2001:db8:2::1
        prefix-length: 64
routes:
  config:
  - destination: b::b/64
    next-hop-interface: dummy1
  - destination: a::a
    next-hop-interface: dummy1
  - destination: 24.24.24.24/24
    next-hop-interface: dummy1
  - destination: 203.0.113.1
    next-hop-interface: dummy1' | sudo nmstatectl set
Using 'set' is deprecated, use 'apply' instead.
[2022-08-09T09:07:58Z INFO  nmstate::nispor::show] Got unsupported interface lo type Loopback
[2022-08-09T09:07:58Z INFO  nmstate::nm::show] Got unsupported interface type generic: lo, ignoring
[2022-08-09T09:07:58Z INFO  nmstate::net_state] Ignoring kernel interface eno4
[2022-08-09T09:07:58Z INFO  nmstate::net_state] Ignoring kernel interface lo
[2022-08-09T09:07:58Z INFO  nmstate::net_state] Ignoring kernel interface eno2
[2022-08-09T09:07:58Z INFO  nmstate::net_state] Ignoring kernel interface eno3
[2022-08-09T09:07:58Z INFO  nmstate::ifaces::inter_ifaces] Changing interface dummy1 with type dummy, up priority 0
[2022-08-09T09:07:58Z WARN  nmstate::route] Route destination b::b/64 sanitized to b::/64
[2022-08-09T09:07:58Z WARN  nmstate::route] Route destination a::a sanitized to a::a/128
[2022-08-09T09:07:58Z WARN  nmstate::route] Route destination 24.24.24.24/24 sanitized to 24.24.24.0/24
[2022-08-09T09:07:58Z WARN  nmstate::route] Route destination 203.0.113.1 sanitized to 203.0.113.1/32
[2022-08-09T09:07:58Z INFO  nmstate::net_state] Created checkpoint /org/freedesktop/NetworkManager/Checkpoint/24
[2022-08-09T09:07:58Z INFO  nmstate::nm::profile] Creating/Modifying connection UUID Some("665ea412-3a17-42e1-acfb-b4507e39adf9"), ID Some("dummy1"), type Some("dummy") name Some("dummy1")
[2022-08-09T09:07:58Z INFO  nmstate::nm::profile] Reapplying connection 665ea412-3a17-42e1-acfb-b4507e39adf9: dummy1/dummy
[2022-08-09T09:07:58Z INFO  nmstate::nispor::show] Got unsupported interface lo type Loopback
[2022-08-09T09:07:58Z INFO  nmstate::nm::show] Got unsupported interface type generic: lo, ignoring
[2022-08-09T09:07:58Z WARN  nmstate::route] Route destination a::a sanitized to a::a/128
[2022-08-09T09:07:58Z WARN  nmstate::route] Route destination b::b/64 sanitized to b::/64
[2022-08-09T09:07:58Z WARN  nmstate::route] Route destination 203.0.113.1 sanitized to 203.0.113.1/32
[2022-08-09T09:07:58Z WARN  nmstate::route] Route destination 24.24.24.24/24 sanitized to 24.24.24.0/24
[2022-08-09T09:07:58Z INFO  nmstate::net_state] Destroyed checkpoint /org/freedesktop/NetworkManager/Checkpoint/24
---
dns-resolver: {}
route-rules: {}
routes:
  config:
    - destination: "b::b/64"
      next-hop-interface: dummy1
    - destination: "a::a"
      next-hop-interface: dummy1
    - destination: 24.24.24.24/24
      next-hop-interface: dummy1
    - destination: 203.0.113.1
      next-hop-interface: dummy1
interfaces:
  - name: dummy1
    type: dummy
    state: up
    ipv4:
      enabled: true
      dhcp: false
      address:
        - ip: 192.0.2.251
          prefix-length: 24
    ipv6:
      enabled: true
      dhcp: false
      autoconf: false
      address:
        - ip: "2001:db8:2::1"
          prefix-length: 64
ovs-db: {}

[17:07:58@dell-per430-03 ~/repo-nmstate/bugs/route-rules-get-lost-when-change-route-config-only_bz1816911]0# nmstatectl show dummy1
[2022-08-09T09:08:02Z INFO  nmstate::nispor::show] Got unsupported interface lo type Loopback
[2022-08-09T09:08:02Z INFO  nmstate::nm::show] Got unsupported interface type generic: lo, ignoring
---
dns-resolver: {}
route-rules: {}
routes:
  running:
    - destination: "a::a/128"
      next-hop-interface: dummy1
      next-hop-address: "::"
      metric: 1024
      table-id: 254
    - destination: "b::/64"
      next-hop-interface: dummy1
      next-hop-address: "::"
      metric: 1024
      table-id: 254
    - destination: "2001:db8:2::/64"
      next-hop-interface: dummy1
      next-hop-address: "::"
      metric: 550
      table-id: 254
    - destination: "fe80::/64"
      next-hop-interface: dummy1
      next-hop-address: "::"
      metric: 1024
      table-id: 254
    - destination: 24.24.24.0/24
      next-hop-interface: dummy1
      next-hop-address: 0.0.0.0
      table-id: 254
    - destination: 192.0.2.0/24
      next-hop-interface: dummy1
      next-hop-address: 0.0.0.0
      metric: 550
      table-id: 254
    - destination: 203.0.113.1/32
      next-hop-interface: dummy1
      next-hop-address: 0.0.0.0
      table-id: 254
  config:
    - destination: "a::a/128"
      next-hop-interface: dummy1
      next-hop-address: "::"
      metric: 1024
      table-id: 254
    - destination: "b::/64"
      next-hop-interface: dummy1
      next-hop-address: "::"
      metric: 1024
      table-id: 254
    - destination: 24.24.24.0/24
      next-hop-interface: dummy1
      next-hop-address: 0.0.0.0
      table-id: 254
    - destination: 203.0.113.1/32
      next-hop-interface: dummy1
      next-hop-address: 0.0.0.0
      table-id: 254
interfaces:
  - name: dummy1
    type: dummy
    state: up
    mac-address: "42:26:16:0A:96:7C"
    mtu: 1500
    wait-ip: any
    ipv4:
      enabled: true
      dhcp: false
      address:
        - ip: 192.0.2.251
          prefix-length: 24
    ipv6:
      enabled: true
      dhcp: false
      autoconf: false
      address:
        - ip: "2001:db8:2::1"
          prefix-length: 64
        - ip: "fe80::4026:16ff:fe0a:967c"
          prefix-length: 64
      addr-gen-mode: eui64
    accept-all-mac-addresses: false
    lldp:
      enabled: false
    ethtool:
      feature:
        tx-generic-segmentation: true
        tx-ipxip4-segmentation: true
        tx-tcp-ecn-segmentation: true
        tx-tcp6-segmentation: true
        highdma: true
        tx-ipxip6-segmentation: true
        tx-scatter-gather-fraglist: true
        tx-sctp-segmentation: true
        tx-checksum-ip-generic: true
        tx-nocache-copy: false
        tx-tcp-mangleid-segmentation: true
        rx-gro-list: false
        tx-udp_tnl-segmentation: true
        tx-tcp-segmentation: true
        tx-gre-segmentation: true
        tx-gre-csum-segmentation: true
        tx-udp-segmentation: true
        tx-udp_tnl-csum-segmentation: true
        tx-gso-list: true
        rx-gro: true
        rx-udp-gro-forwarding: false

Comment 6 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