Hide Forgot
Created attachment 1785085 [details] Reproducer Description of problem: Cannot remove route that is not in default route table. Version-Release number of selected component (if applicable): nmstate-1.0.2-6.el8.noarch nispor-1.0.1-4.el8.x86_64 How reproducible: 100% Steps to Reproduce: 1. Run the reproducer Actual results: The route in table 5000 is still present Expected results: The route should be gone
I have a similar test but it works well... After comparing and investigating, I find if you add a ipv6 route in the beginning, it will work. The only difference is to replace `dummy0.yaml` with: cat << EOF > dummy0.yaml --- interfaces: - name: dummy0 type: dummy state: up ipv4: address: - ip: 192.0.1.100 prefix-length: 24 dhcp: false enabled: true ipv6: enabled: true address: - ip: 1000::1010 prefix-length: 64 routes: config: - destination: 192.0.1.0/24 metric: 150 next-hop-address: 192.0.1.100 next-hop-interface: dummy0 table-id: 5000 - destination: ::/0 metric: -1 next-hop-address: 1000::1 next-hop-interface: dummy0 table-id: 200 EOF
This looks like a NetworkManager bug to me. The `Reapply` of NetworkManager does not remove old route entries. The workaround is possible in nmstate by using normal activation when route changes. Bridge or bond port cannot hold route entries, so this should not impact existing user needing `Reapply`. Will collect logs and report new bugs to NetworkManager and then we decide whether we choose workaround in nmstate or fix in NetworkManager or even both.
Bug reported to https://bugzilla.redhat.com/show_bug.cgi?id=1964336 to NetworkManager with low priority as nmstate workaround is easy. Nmstate patch posted to upstream: https://github.com/nmstate/nmstate/pull/1602
Pretested with versions: nmstate-1.1.0-0.20210526235438600256.pr1602.45.g738d25a.el8.noarch nispor-1.1.0-4.el8.x86_64 NetworkManager-1.32.0-0.3.el8.x86_64 DISTRO=RHEL-8.5.0-20210524.d.0 Linux dell-per740-80.rhts.eng.pek2.redhat.com 4.18.0-305.7.el8.kpq1.x86_64 #1 SMP Mon May 17 13:36:02 EDT 2021 x86_64 x86_64 x86_64 GNU/Linux Simply run the reproducer, and when the route was removed, the corresponding NM profile was deactivated(the old behavior is only one: 'changed') dummy0: connection profile changed dummy0: deactivating dummy0: disconnected dummy0: device removed dummy0: device created dummy0: unavailable dummy0: disconnected dummy0: using connection 'dummy0' dummy0: connecting (prepare) dummy0: connecting (configuring) dummy0: connecting (getting IP configuration) dummy0: connecting (checking IP connectivity) dummy0: connecting (starting secondary connections) dummy0: connected
Verified with versions: nmstate-1.1.0-0.3.alpha3.el8.noarch nispor-1.1.0-2.el8.x86_64 NetworkManager-1.32.0-0.5.el8.x86_64 The result is same with #comment7
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-2021:4157