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 2130938 - [RFE] Support route rule in gen_conf mode
Summary: [RFE] Support route rule in gen_conf mode
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: nmstate
Version: 9.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Fernando F. Mancera
QA Contact: Mingyu Shi
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-09-29 13:57 UTC by Fernando F. Mancera
Modified: 2023-12-09 10:58 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-05-09 07:31:48 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker NMT-986 0 None None None 2023-12-09 10:58:14 UTC
Red Hat Issue Tracker RHELPLAN-135306 0 None None None 2022-09-29 14:02:12 UTC
Red Hat Issue Tracker RHELPLAN-135308 0 None None None 2022-10-17 08:57:12 UTC
Red Hat Product Errata RHBA-2023:2190 0 None None None 2023-05-09 07:32:03 UTC

Description Fernando F. Mancera 2022-09-29 13:57:16 UTC
Description of problem:

Nmstate do not provide route rule support for gen_conf mode and it should.

Comment 5 Mingyu Shi 2022-11-16 05:14:26 UTC
Verified with:
nmstate-2.2.1-0.alpha.20221110.el9.x86_64
NetworkManager-1.41.4-2.el9.x86_64
Linux dell-per750-01.rhts.eng.pek2.redhat.com 5.14.0-194.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Sat Nov 12 06:46:54 EST 2022 x86_64 x86_64 x86_64 GNU/Linux
DISTRO=RHEL-9.2.0-20221114.3

Given YAML state:
---
interfaces:
  - name: veth0
    type: ethernet
    state: up
    ipv6:
      address:
      - ip: 100::1
        prefix-length: 64
      enabled: true
    ipv4:
      address:
      - ip: 192.0.2.251
        prefix-length: 24
      enabled: true
  - name: veth1
    type: ethernet
    state: up
    ipv6:
      address:
      - ip: 1::1
        prefix-length: 64
      enabled: true
    ipv4:
      address:
      - ip: 198.51.100.251
        prefix-length: 24
      enabled: true
route-rules:
  config:
  - ip-to: 192.0.2.0/24
    priority: 1000
    route-table: 50
  - ip-from: 192.0.2.1/24
    priority: 1001
    route-table: 50
  - ip-to: 198.51.100.99/24
    priority: 1002
    route-table: 51
  - ip-from: 198.51.100.255/24
    priority: 1003
    route-table: 51
  - ip-to: 100::/64
    priority: 1000
    route-table: 50
  - ip-from: 100::/64
    priority: 1001
    route-table: 50
  - ip-to: 1::/64
    priority: 1002
    route-table: 51
  - ip-from: 1::/64
    priority: 1003
    route-table: 51
  - ip-to: 192.0.2.0/24
    ip-from: 192.0.2.1/24
    priority: 20000
    route-table: 50
  - ip-to: 100::/64
    priority: 20000
    route-table: 50
    ip-from: 100::/64
routes:
  config:
  - destination: 0.0.0.0/0
    metric: 150
    next-hop-address: 192.0.2.1
    next-hop-interface: veth0
    table-id: 50
  - destination: ::/0
    metric: 100
    next-hop-address: 100::254
    next-hop-interface: veth0
    table-id: 50
  - destination: 0.0.0.0/0
    metric: 151
    next-hop-address: 198.51.100.1
    next-hop-interface: veth1
    table-id: 51
  - destination: ::/0
    metric: 1
    next-hop-address: 1::254
    next-hop-interface: veth1
    table-id: 51

`nmstatectl gc $YAML_file` outputs:
NetworkManager:
- - veth0.nmconnection
  - |
    [connection]
    autoconnect=true
    autoconnect-slaves=-1
    id=veth0
    interface-name=veth0
    type=802-3-ethernet
    uuid=2cc2a1da-40dc-523d-83c5-8a163e5dd245

    [ipv4]
    address0=192.0.2.251/24
    method=manual
    route0=0.0.0.0/0,192.0.2.1,150
    route0_options=table=50
    routing-rule0=priority 1000 to 192.0.2.0/24 table 50
    routing-rule1=priority 1001 from 192.0.2.0/24 table 50
    routing-rule2=priority 20000 to 192.0.2.0/24 from 192.0.2.0/24 table 50

    [ipv6]
    addr-gen-mode=0
    address0=100::1/64
    method=manual
    route0=::/0,100::254,100
    route0_options=table=50
    routing-rule0=priority 1000 to 100::/64 table 50
    routing-rule1=priority 1001 from 100::/64 table 50
    routing-rule2=priority 20000 to 100::/64 from 100::/64 table 50
- - veth1.nmconnection
  - |
    [connection]
    autoconnect=true
    autoconnect-slaves=-1
    id=veth1
    interface-name=veth1
    type=802-3-ethernet
    uuid=854773cf-cad9-5212-ac9c-d1da0de907ad

    [ipv4]
    address0=198.51.100.251/24
    method=manual
    route0=0.0.0.0/0,198.51.100.1,151
    route0_options=table=51
    routing-rule0=priority 1002 to 198.51.100.0/24 table 51
    routing-rule1=priority 1003 from 198.51.100.0/24 table 51

    [ipv6]
    addr-gen-mode=0
    address0=1::1/64
    method=manual
    route0=::/0,1::254,1
    route0_options=table=51
    routing-rule0=priority 1002 to 1::/64 table 51
    routing-rule1=priority 1003 from 1::/64 table 51

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


Note You need to log in before you can comment on or make changes to this bug.