Bug 2095338
| Summary: | nmstate rust cannot configure route without listing the interface | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 9 | Reporter: | Mingyu Shi <mshi> |
| Component: | nmstate | Assignee: | Gris Ge <fge> |
| Status: | CLOSED ERRATA | QA Contact: | Mingyu Shi <mshi> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 9.1 | CC: | ferferna, jiji, jishi, network-qe, till |
| Target Milestone: | rc | Keywords: | Triaged |
| Target Release: | --- | Flags: | pm-rhel:
mirror+
|
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | No Doc Update | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2022-11-15 10:01:25 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: | |||
Patch send to upstream: https://github.com/nmstate/nmstate/pull/1971 The failure is caused by `30.0.0.1/24`. The patch now supports these IP network format: * `192.0.2.1/24` == `192.0.2.0/24` * `192.0.2.1` == `192.0.2.1/32` * `2001:db8:1::1/64` == `2001:db8:1::0/64` * `2001:db8:1::1` = `2001:db8:1::1/128` * `2001:db8:1:0000:000::1` == `2001:db8:1::1/128` And for route next hop address, you can also use `2001:db8:1:0000:000::1` format. Pretested with:
nmstate-2.1.3-0.20220718065008612895.pr1971.12.g22954b0a.el9.x86_64
NetworkManager-1.39.8-1.el9.x86_64
Successfully configured, `routes` and `route-rules` showed as:
route-rules:
config:
- ip-to: 10.0.0.0/24
priority: 10
route-table: 10
- ip-from: 20.0.0.0/24
priority: 10
route-table: 10
routes:
running:
- destination: "1:10::/64"
next-hop-interface: dummy0
next-hop-address: "::"
metric: 550
table-id: 254
- destination: "fe80::/64"
next-hop-interface: dummy0
next-hop-address: "::"
metric: 550
table-id: 254
- destination: "fe80::/64"
next-hop-interface: eno1
next-hop-address: "::"
metric: 1024
table-id: 254
- destination: "fe80::/64"
next-hop-interface: dummy0
next-hop-address: "::"
metric: 1024
table-id: 254
- destination: 0.0.0.0/0
next-hop-interface: dummy0
next-hop-address: 1.0.0.254
metric: 10
table-id: 10
- destination: 1.0.0.254/32
next-hop-interface: dummy0
next-hop-address: 0.0.0.0
metric: 10
table-id: 10
- destination: 30.0.0.0/24
next-hop-interface: dummy0
next-hop-address: 1.0.0.30
metric: 10
table-id: 10
- destination: 0.0.0.0/0
next-hop-interface: eno1
next-hop-address: 10.65.177.254
metric: 100
table-id: 254
- destination: 1.0.0.0/24
next-hop-interface: dummy0
next-hop-address: 0.0.0.0
metric: 550
table-id: 254
- destination: 10.65.176.0/23
next-hop-interface: eno1
next-hop-address: 0.0.0.0
metric: 100
table-id: 254
config:
- destination: 0.0.0.0/0
next-hop-interface: dummy0
next-hop-address: 1.0.0.254
metric: 10
table-id: 10
- destination: 1.0.0.254/32
next-hop-interface: dummy0
next-hop-address: 0.0.0.0
metric: 10
table-id: 10
- destination: 30.0.0.0/24
next-hop-interface: dummy0
next-hop-address: 1.0.0.30
metric: 10
table-id: 10
Verified with: nmstate-2.1.3-1.el9.x86_64 NetworkManager-1.39.10-1.el9.x86_64 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 |
Description of problem: As storing routes etc in loopback is not implemented yet, this could be a problem. The same action works well on RHEL 8. Version-Release number of selected component (if applicable): nmstate-2.1.1-0.alpha.20220602.5accbd1.el9.x86_64 How reproducible: 100% Steps to Reproduce: echo " route-rules: config: - ip-to: 10.0.0.0/24 priority: 10 route-table: 10 - ip-from: 20.0.0.0/24 priority: 10 route-table: 10 routes: config: - destination: 0.0.0.0/0 metric: 10 next-hop-address: 1.0.0.254 next-hop-interface: dummy0 table-id: 10 interfaces: - name: dummy0 type: dummy state: up ipv4: address: - ip: 1.0.0.1 prefix-length: 24 dhcp: false enabled: true ipv6: address: - ip: 1:10::1 prefix-length: 64 autoconf: false dhcp: false enabled: true " | nmstatectl apply echo " routes: config: - destination: 0.0.0.0/0 metric: 10 next-hop-address: 1.0.0.254 next-hop-interface: dummy0 table-id: 10 - destination: 30.0.0.1/24 metric: 10 next-hop-address: 1.0.0.30 next-hop-interface: dummy0 table-id: 10 " | nmstatectl apply Actual results: NmstateError: VerificationError: Desired route RouteEntry { state: None, destination: Some("30.0.0.1/24"), next_hop_iface: Some("dummy0"), next_hop_addr: Some("1.0.0.30"), metric: Some(10), table_id: Some(10) } not found after apply Expected results: No failure, configured the routes in dummy0(if loopback as a storage is not implemented) Additional info: