Created attachment 1785085 [details]
Description of problem:
Cannot remove route that is not in default route table.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Run the reproducer
The route in table 5000 is still present
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
- name: dummy0
- ip: 184.108.40.206
- ip: 1000::1010
- destination: 220.127.116.11/24
- destination: ::/0
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:
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: device removed
dummy0: device created
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)
Verified with versions:
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.