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 2044766 - nmstate-rust cannot deal with same routes(only metric is different)
Summary: nmstate-rust cannot deal with same routes(only metric is different)
Keywords:
Status: CLOSED DUPLICATE of bug 2094895
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: nmstate
Version: 8.6
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: ---
Assignee: Gris Ge
QA Contact: Mingyu Shi
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-01-25 07:27 UTC by Mingyu Shi
Modified: 2022-07-27 07:56 UTC (History)
5 users (show)

Fixed In Version: nmstate-1.3.1-1.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-07-27 07:56:02 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-109480 0 None None None 2022-01-25 07:32:01 UTC

Description Mingyu Shi 2022-01-25 07:27:04 UTC
Description of problem:
According to this bug https://bugzilla.redhat.com/show_bug.cgi?id=1896934#c22
"if multiple same routes(only metric is different) are committed via nmstate, now only one route will be preserved(chosen randomly)"
nmstate(python) works fine, but this breaks in nmstate-rust

Version-Release number of selected component (if applicable):
nmstate-1.2.1-0.1.alpha1.el8.x86_64
nispor-1.2.3-1.el8.x86_64
NetworkManager-1.36.0-0.4.el8.x86_64

How reproducible:
100%

Steps to Reproduce:
cat << EOF > default_gateways.yaml
interfaces:
- name: dummy0
  type: dummy
  state: up
  ipv4:
    address:
    - ip: 192.0.2.251
      prefix-length: 24
    enabled: true
  ipv6:
    address:
    - ip: 192::251
      prefix-length: 64
    enabled: true
routes:
  config:
  - destination: 0.0.0.0/0
    next-hop-address: 192.0.2.1
    next-hop-interface: dummy0
    metric: 300
  - destination: 0.0.0.0/0
    next-hop-address: 192.0.2.1
    next-hop-interface: dummy0
    metric: 301
EOF
nmstatectl-rust apply default_gateways.yaml

Actual results:
[2022-01-25T07:25:35Z ERROR nmstate::route] VerificationError: Desired route RouteEntry { state: None, destination: Some("0.0.0.0/0"), next_hop_iface: Some("dummy0"), next_hop_addr: Some("192.0.2.1"), metric: Some(301), table_id: None } not found after apply
[2022-01-25T07:25:36Z ERROR nmstate::route] VerificationError: Desired route RouteEntry { state: None, destination: Some("0.0.0.0/0"), next_hop_iface: Some("dummy0"), next_hop_addr: Some("192.0.2.1"), metric: Some(301), table_id: None } not found after apply
[2022-01-25T07:25:37Z ERROR nmstate::route] VerificationError: Desired route RouteEntry { state: None, destination: Some("0.0.0.0/0"), next_hop_iface: Some("dummy0"), next_hop_addr: Some("192.0.2.1"), metric: Some(301), table_id: None } not found after apply
[2022-01-25T07:25:38Z ERROR nmstate::route] VerificationError: Desired route RouteEntry { state: None, destination: Some("0.0.0.0/0"), next_hop_iface: Some("dummy0"), next_hop_addr: Some("192.0.2.1"), metric: Some(301), table_id: None } not found after apply
[2022-01-25T07:25:39Z ERROR nmstate::route] VerificationError: Desired route RouteEntry { state: None, destination: Some("0.0.0.0/0"), next_hop_iface: Some("dummy0"), next_hop_addr: Some("192.0.2.1"), metric: Some(301), table_id: None } not found after apply
NmstateError: VerificationError: Desired route RouteEntry { state: None, destination: Some("0.0.0.0/0"), next_hop_iface: Some("dummy0"), next_hop_addr: Some("192.0.2.1"), metric: Some(301), table_id: None } not found after apply

Expected results:
PASS like in nmstate python, reserve one route

Additional info:

Comment 1 Gris Ge 2022-07-27 07:56:02 UTC
The rust API in RHEL 8 is just tech-preview.

But this has been fixed by the patch in bug 2094895

The fix is shipping at nmstate-1.3.1-1.el8

*** This bug has been marked as a duplicate of bug 2094895 ***


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