Bug 2010640

Summary: Network route disappears after service restart
Product: Red Hat Enterprise Linux 8 Reporter: Ales Musil <amusil>
Component: NetworkManagerAssignee: Lubomir Rintel <lrintel>
Status: CLOSED ERRATA QA Contact: David Jaša <djasa>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 8.5CC: bgalvani, djasa, fge, lmiksik, lrintel, mburman, michal.skrivanek, mperina, nm-team, rkhan, sukulkar, till, vbenes, ymankad
Target Milestone: rcKeywords: Automation, Regression, TestBlocker, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-05-10 14:54:14 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:
Bug Depends On:    
Bug Blocks: 2019807    
Attachments:
Description Flags
Reproducer none

Description Ales Musil 2021-10-05 09:09:31 UTC
Created attachment 1829310 [details]
Reproducer

Description of problem:
After restarting NetworkManager the network route e.g. fd00::/64 disappears.

Version-Release number of selected component (if applicable):
NetworkManager-1.34.0-0.1.el8.x86_64

How reproducible:
For oVirt HE deploy it is 100%,
for the reproduction script provided ~50% (I have probably missed something)

Steps to Reproduce:
1. Run the reproducer


Actual results:
fd00::/64 route is missing

Expected results:
fd00::/64 should be still present

Comment 2 Gris Ge 2021-10-13 06:40:28 UTC
Hi Ales,

Does this problem impact any production or just a harmless inconsistency?

Comment 3 Ales Musil 2021-10-13 06:45:39 UTC
(In reply to Gris Ge from comment #2)
> Hi Ales,
> 
> Does this problem impact any production or just a harmless inconsistency?

Hi,

it impacts host deploy for RHV hosted engine that's why it is high.

Comment 7 Ales Musil 2021-11-02 14:03:50 UTC
Looks like a regression between 8.4 and 8.5. The NetworkManager-1.30.0-10.el8_4 didn't have this issue.

Comment 8 Till Maas 2021-11-02 14:43:29 UTC
Just wondering, why are you restarting NetworkManager?

Comment 9 Ales Musil 2021-11-02 14:47:49 UTC
(In reply to Till Maas from comment #8)
> Just wondering, why are you restarting NetworkManager?

We are adding NM config during host deploy.

Comment 10 Beniamino Galvani 2021-11-03 12:22:29 UTC
This seems a duplicate of bug 2004212, which was fixed in NetworkManager-1.32.10-3.el8 on RHEL 8.5, and in NetworkManager-1.34.0-0.2 on RHEL 8.6.

Comment 11 Michael Burman 2021-11-03 12:32:43 UTC
(In reply to Beniamino Galvani from comment #10)
> This seems a duplicate of bug 2004212, which was fixed in
> NetworkManager-1.32.10-3.el8 on RHEL 8.5, and in NetworkManager-1.34.0-0.2
> on RHEL 8.6.

Unfortunately no, this is not a duplicate.
We fail with NetworkManager-1.32.10-4.el8.x86_64

Comment 12 Ales Musil 2021-11-03 13:24:50 UTC
Also NetworkManager-1.34.0-0.3.el8.x86_64 still fails.

Comment 17 Lubomir Rintel 2021-11-04 14:38:19 UTC
(In reply to Ales Musil from comment #9)
> (In reply to Till Maas from comment #8)
> > Just wondering, why are you restarting NetworkManager?
> 
> We are adding NM config during host deploy.

"nmcli general reload conf" would be a better idea here.

Comment 20 Lubomir Rintel 2021-11-30 11:31:09 UTC
This was fixed by the NetworkManager/next merge.

Test added: https://gitlab.freedesktop.org/NetworkManager/NetworkManager-ci/-/merge_requests/878

Comment 21 Vladimir Benes 2021-12-07 14:45:58 UTC
(In reply to Lubomir Rintel from comment #20)
> This was fixed by the NetworkManager/next merge.
> 
> Test added:
> https://gitlab.freedesktop.org/NetworkManager/NetworkManager-ci/-/
> merge_requests/878

actually, the test still fails with the main copr build

Comment 31 David Jaša 2022-01-26 14:28:02 UTC
I found a corner case when NM still deletes the route upon restart: it happens when the interface has v6 route configured but not v6 address. This behaviour is different to v4 where route-with-no-address-to-reach-the-scope survives NM restart:

v6:
[root@rhel8-at-cihla NetworkManager-ci]# ip -6 r
::1 dev lo proto kernel metric 256 pref medium
fe80::/64 dev eth0 proto kernel metric 1024 pref medium
default via fe80::474f:be6c:bd42:1d27 dev eth0 proto ra metric 99 pref medium
[root@rhel8-at-cihla NetworkManager-ci]# ip r add fd00::/64 dev eth3
[root@rhel8-at-cihla NetworkManager-ci]# ip -6 r
::1 dev lo proto kernel metric 256 pref medium
fd00::/64 dev eth3 metric 1024 pref medium
fe80::/64 dev eth0 proto kernel metric 1024 pref medium
default via fe80::474f:be6c:bd42:1d27 dev eth0 proto ra metric 99 pref medium
[root@rhel8-at-cihla NetworkManager-ci]# systemctl restart NetworkManager
[root@rhel8-at-cihla NetworkManager-ci]# ip -6 r
::1 dev lo proto kernel metric 256 pref medium
fe80::/64 dev eth0 proto kernel metric 1024 pref medium
default via fe80::474f:be6c:bd42:1d27 dev eth0 proto ra metric 99 pref medium


v4:
[root@rhel8-at-cihla NetworkManager-ci]# ip -4 a show dev eth3
[root@rhel8-at-cihla NetworkManager-ci]# ip -4 r show dev eth3
[root@rhel8-at-cihla NetworkManager-ci]# ip -4 r add 192.168.128/24 dev eth3
[root@rhel8-at-cihla NetworkManager-ci]# ip -4 r show dev eth3
192.168.128.0/24 scope link 
[root@rhel8-at-cihla NetworkManager-ci]# ip -4 a show dev eth3
[root@rhel8-at-cihla NetworkManager-ci]# systemctl restart NetworkManager
[root@rhel8-at-cihla NetworkManager-ci]# ip -4 a show dev eth3
[root@rhel8-at-cihla NetworkManager-ci]# ip -4 r show dev eth3
192.168.128.0/24 scope link



[root@rhel8-at-cihla NetworkManager-ci]# rpm -q NetworkManager
NetworkManager-1.36.0-0.3.el8.x86_64

Comment 32 David Jaša 2022-01-26 15:28:16 UTC
I got the manual reproducer in #c31 wrong - it's different scenario not reported by RHV QE team. When route is added by kernel in response to adding address manually, it's no longer removed upon restart of recent NM versions:


[root@rhel8-at-cihla NetworkManager-ci]# nmcli -f device,state d | grep eth3
eth3        unmanaged    
[root@rhel8-at-cihla NetworkManager-ci]# ip a add 192.168.128.1/24 dev eth3
[root@rhel8-at-cihla NetworkManager-ci]# ip a add fd00::1/64 dev eth3
[root@rhel8-at-cihla NetworkManager-ci]# ip a show dev eth3
10: eth3@if9: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 46:b1:81:61:46:b3 brd ff:ff:ff:ff:ff:ff link-netns vethsetup
    inet 192.168.128.1/24 scope global eth3
       valid_lft forever preferred_lft forever
    inet6 fd00::1/64 scope global 
       valid_lft forever preferred_lft forever
[root@rhel8-at-cihla NetworkManager-ci]# ip -4 r show dev eth3
192.168.128.0/24 proto kernel scope link src 192.168.128.1 
[root@rhel8-at-cihla NetworkManager-ci]# ip -6 r show dev eth3
fd00::/64 proto kernel metric 256 pref medium
[root@rhel8-at-cihla NetworkManager-ci]# systemctl restart NetworkManager
[root@rhel8-at-cihla NetworkManager-ci]# ip a show dev eth3
10: eth3@if9: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 46:b1:81:61:46:b3 brd ff:ff:ff:ff:ff:ff link-netns vethsetup
    inet 192.168.128.1/24 scope global eth3
       valid_lft forever preferred_lft forever
    inet6 fd00::1/64 scope global 
       valid_lft forever preferred_lft forever
[root@rhel8-at-cihla NetworkManager-ci]# ip -4 r show dev eth3
192.168.128.0/24 proto kernel scope link src 192.168.128.1 
[root@rhel8-at-cihla NetworkManager-ci]# ip -6 r show dev eth3
fd00::/64 proto kernel metric 256 pref medium

Comment 36 errata-xmlrpc 2022-05-10 14:54:14 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 (NetworkManager 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:1985