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 1914772 - changing auto-route-table-id won't take effect directly
Summary: changing auto-route-table-id won't take effect directly
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: nmstate
Version: 8.4
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: 8.4
Assignee: Fernando F. Mancera
QA Contact: Mingyu Shi
URL:
Whiteboard:
Depends On: 2040683
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-01-11 08:07 UTC by Mingyu Shi
Modified: 2023-03-30 09:50 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-05-10 13:34:46 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-451 0 None None None 2023-03-30 09:50:16 UTC
Red Hat Product Errata RHEA-2022:1772 0 None None None 2022-05-10 13:35:02 UTC

Description Mingyu Shi 2021-01-11 08:07:39 UTC
Description of problem:
If an iface with dhcp is running, changing its auto-route-table-id won't take effect directly. It means though config is changed, the routes from DHCP is still installed in old table.

Version-Release number of selected component (if applicable):
nmstate-1.0.1-0.1.el8.noarch
nispor-1.0.1-2.el8.x86_64
NetworkManager-1.30.0-0.5.el8.x86_64

How reproducible:
100%

Steps to Reproduce:
# use dnsmasq as an example
cat << EOF > /etc/dnsmasq.d/nmstate.conf 
interface=veth0_ep
dhcp-range=192.168.199.10,192.168.199.250,255.255.255.0,48h
dhcp-option=option:classless-static-route,198.51.100.0/24,192.168.199.1
dhcp-option=option:dns-server,192.168.199.251
EOF

ip link add veth0 type veth peer veth0_ep
echo "---
interfaces:
- name: veth0
  type: ethernet
  state: up
  ipv4:
    enabled: true
    auto-route-table-id: 1000
    dhcp: true
- name: veth0_ep
  type: ethernet
  state: up
  ipv4:
    enabled: true
    address:
    - ip: 192.168.199.1
      prefix-length: 24" | nmstatectl set

systemctl restart dnsmasq

# do following when veth0 gets dhcp result
ip route ls table 1000
echo "---
interfaces:
- name: veth0
  type: ethernet
  state: up
  ipv4:
    enabled: true
    auto-route-table-id: 1001
    dhcp: true" | nmstatectl set
ip route ls table 1000
ip route ls table 1001


Actual results:
DHCP routes are still installed in table 1000

Expected results:
Installed in 1001

Additional info:
As NM profile was changed, running 'nmcli con up veth0' will take it effect.

Comment 1 Fernando F. Mancera 2021-05-06 12:28:45 UTC
Hi Mingyu, do you mean if you run 'nmcli con up veth0' it will take effect, but if not it won't? Sorry, the reproducer is not clear to me, thank you!

Comment 2 Mingyu Shi 2021-05-12 03:56:52 UTC
(In reply to Fernando F. Mancera from comment #1)
> Hi Mingyu, do you mean if you run 'nmcli con up veth0' it will take effect,
> but if not it won't? Sorry, the reproducer is not clear to me, thank you!

Yes, please refer the following result:

> Steps to Reproduce:
> # use dnsmasq as an example
> cat << EOF > /etc/dnsmasq.d/nmstate.conf 
> interface=veth0_ep
> dhcp-range=192.168.199.10,192.168.199.250,255.255.255.0,48h
> dhcp-option=option:classless-static-route,198.51.100.0/24,192.168.199.1
> dhcp-option=option:dns-server,192.168.199.251
> EOF
> 
> ip link add veth0 type veth peer veth0_ep
> echo "---
> interfaces:
> - name: veth0
>   type: ethernet
>   state: up
>   ipv4:
>     enabled: true
>     auto-route-table-id: 1000
>     dhcp: true
> - name: veth0_ep
>   type: ethernet
>   state: up
>   ipv4:
>     enabled: true
>     address:
>     - ip: 192.168.199.1
>       prefix-length: 24" | nmstatectl set
> 
> systemctl restart dnsmasq
> 
> # do following when veth0 gets dhcp result
> ip route ls table 1000

# ip route ls table 1000
default via 192.168.199.1 dev veth0 proto dhcp metric 101 
192.168.199.0/24 dev veth0 proto kernel scope link src 192.168.199.178 metric 101 
198.51.100.0/24 via 192.168.199.1 dev veth0 proto dhcp metric 101

> echo "---
> interfaces:
> - name: veth0
>   type: ethernet
>   state: up
>   ipv4:
>     enabled: true
>     auto-route-table-id: 1001
>     dhcp: true" | nmstatectl set
> ip route ls table 1000
> ip route ls table 1001

# ip route ls table 1000
default via 192.168.199.1 dev veth0 proto dhcp metric 101 
192.168.199.1 dev veth0 proto dhcp scope link metric 101 
198.51.100.0/24 via 192.168.199.1 dev veth0 proto dhcp metric 101
# ip route ls table 1001
192.168.199.0/24 dev veth0 proto kernel scope link src 192.168.199.178 metric 101

In above, changed auto-route-table-id from 1000 to 1001, but you can see the table 1001 was with only one link local route entry, the routes from DHCP server were still in table 1000

> 
> 
> Actual results:
> DHCP routes are still installed in table 1000
> 
> Expected results:
> Installed in 1001
> 
> Additional info:
> As NM profile was changed, running 'nmcli con up veth0' will take it effect.

After running "nmcli con up veth0", the routes all went to table 1001 and the table 1000 is empty now
[11:44:57@mshi-rhel-850-20210328d2 /etc/yum.repos.d]0# nmcli con up veth0
Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/7)
[11:45:07@mshi-rhel-850-20210328d2 /etc/yum.repos.d]0# ip route ls table 1000
[11:45:10@mshi-rhel-850-20210328d2 /etc/yum.repos.d]0# ip route ls table 1001
default via 192.168.199.1 dev veth0 proto dhcp metric 103 
192.168.199.0/24 dev veth0 proto kernel scope link src 192.168.199.178 metric 103 
198.51.100.0/24 via 192.168.199.1 dev veth0 proto dhcp metric 103

Comment 3 Fernando F. Mancera 2022-01-14 13:54:46 UTC
This issue was a NetworkManager problem, they fixed it on main branch and there is a build with the fix now. It can be tested by QA. Thank you for reporting this. https://bugzilla.redhat.com/show_bug.cgi?id=2040683

Comment 7 Mingyu Shi 2022-02-06 07:53:59 UTC
Verified with versions:
nmstate-1.2.1-0.2.alpha2.el8.x86_64
nispor-1.2.2-1.el8.x86_64
NetworkManager-1.36.0-0.3.el8.x86_64

Comment 9 errata-xmlrpc 2022-05-10 13:34:46 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/RHEA-2022:1772


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