Bug 1463077 - Network disconnected by NetworkManager when bonding "updelay=100" specified for network install
Network disconnected by NetworkManager when bonding "updelay=100" specified f...
Status: VERIFIED
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: NetworkManager (Show other bugs)
7.3
All Linux
unspecified Severity medium
: rc
: ---
Assigned To: Beniamino Galvani
Desktop QE
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-06-20 01:53 EDT by Taketo Kabe
Modified: 2018-01-15 04:59 EST (History)
8 users (show)

See Also:
Fixed In Version: NetworkManager-1.10.2-3.el7
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Patch for NetworkManager (1.43 KB, text/plain)
2017-06-20 01:53 EDT, Taketo Kabe
no flags Details
[PATCH] bond: ignore miimon option only when it is zero (3.06 KB, patch)
2017-06-22 04:30 EDT, Beniamino Galvani
no flags Details | Diff
[CI PATCH] bond: add tests for miimon option (3.22 KB, patch)
2017-06-22 04:36 EDT, Beniamino Galvani
no flags Details | Diff
this doesn't work as those tests are written (1.18 MB, text/plain)
2017-12-08 10:42 EST, Vladimir Benes
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
CentOS 13423 None None None 2017-06-20 01:53 EDT

  None (edit)
Description Taketo Kabe 2017-06-20 01:53:30 EDT
Created attachment 1289398 [details]
Patch for NetworkManager

Description of problem:
Network disconnected by NetworkManager when bonding "updelay=100" specified for network install


Version-Release number of selected component (if applicable):
NetworkManager-1.4.0-20.el7_3
dracut-network-033-463.el7


How reproducible:
always


Steps to Reproduce:
- Prepare an NFS server [ip=10.6.0.30] exporting /export/rhel/rhel-*-7.3-x86_64-dvd.iso .
- Boot a network installation with kernel command line:
  net.ifnames=0 inst.repo=nfs:vers=4:10.6.0.30:/export/rhel ip=bond0:dhcp bond=bond0:eth0:mode=1,fail_over_mac=1,miimon=100,updelay=100


Actual results:
tmux starts (sometimes not), and stage2 of anaconda doesn't start and freezes.


Expected results:
Anaconda stage2 runs, and anaconda greeter output and shell on tty2 should be available.


Workaround:
Specify non-default miimon value like

 bond=bond0:eth0:miimon=101,updelay=101

This will properly inherit the bond0 interface settings setup by dracut
and anaconda could continue.


Additional info:
The bond0 interface seems to have lost its IP address by NetworkManager.

To diagnose the problem, you can disable NetworkManager on boot to
have a shell available:

- boot with kernel command line 
   net.ifnames=0 inst.repo=nfs:vers=4:10.6.0.30:/export/rhel ip=bond0:dhcp bond=bond0:eth0:mode=1,miimon=100,updelay=100 init=/bin/sh
- After switch-root, it drops to shell. Disable NetworkManager and continue boot by:
   # ln -s /dev/null /etc/systemd/system/NetworkManager.service # equivalent of "systemctl mask NetworkManager"
   # exec /usr/lib/systemd/systemd --system
- Eventually anaconda stage2 runs, and shell is available at tty2.

Manually invoking NetworkManager from the prompt will break the network:
   # /usr/sbin/NetworkManager -d --log-level TRACE &
Now, commands other than bash builtins stop responding since NFS connection is broken.
Comment 2 Taketo Kabe 2017-06-20 01:58:08 EDT
Additional diagnostics and patch available at:
https://bugs.centos.org/view.php?id=13423
Comment 3 Beniamino Galvani 2017-06-22 04:30 EDT
Created attachment 1290569 [details]
[PATCH] bond: ignore miimon option only when it is zero

(In reply to Taketo Kabe from comment #2)
> Additional diagnostics and patch available at:
> https://bugs.centos.org/view.php?id=13423

While this looks correct, I think it's not necessary to always add miimon,updelay,downdelay to the generated connection. Updelay and downdelay should be ignored if they are set to the default value, and miimon should only be set when different from 0. How about this patch instead?
Comment 4 Beniamino Galvani 2017-06-22 04:36 EDT
Created attachment 1290574 [details]
[CI PATCH] bond: add tests for miimon option

CI tests for this bz
Comment 5 Thomas Haller 2017-06-22 04:54:39 EDT
(In reply to Beniamino Galvani from comment #3)
> Created attachment 1290569 [details]
> [PATCH] bond: ignore miimon option only when it is zero
> 
> (In reply to Taketo Kabe from comment #2)
> > Additional diagnostics and patch available at:
> > https://bugs.centos.org/view.php?id=13423
> 
> While this looks correct, I think it's not necessary to always add
> miimon,updelay,downdelay to the generated connection. Updelay and downdelay
> should be ignored if they are set to the default value, and miimon should
> only be set when different from 0. How about this patch instead?

lgtm
Comment 6 Taketo Kabe 2017-06-22 21:44:30 EDT
(In reply to Beniamino Galvani from comment #3)
> Created attachment 1290569 [details]
> [PATCH] bond: ignore miimon option only when it is zero
>
> While this looks correct, I think it's not necessary to always add
> miimon,updelay,downdelay to the generated connection. Updelay and downdelay
> should be ignored if they are set to the default value, and miimon should
> only be set when different from 0. How about this patch instead?

Confirmed that this patch works with both
"updelay=100" and "arp_interval=1000,arp_ip_target=10.6.0.1" modes;
network installer doesn't freeze and NFS isn't disconnected.

I also had the feeling that only miimon needs be treated specially.

The code to not ignore all arp_interval/miimon/downdelay/updelay had been in
initial commit c90730fa 2013/08/28, so the exact rationale is unknown.
Just-to-be-sure defensive programming?
Comment 7 Beniamino Galvani 2017-06-23 02:16:08 EDT
(In reply to Taketo Kabe from comment #6)
> Confirmed that this patch works with both
> "updelay=100" and "arp_interval=1000,arp_ip_target=10.6.0.1" modes;
> network installer doesn't freeze and NFS isn't disconnected.

Thanks for trying this.

> The code to not ignore all arp_interval/miimon/downdelay/updelay had been in
> initial commit c90730fa 2013/08/28, so the exact rationale is unknown.
> Just-to-be-sure defensive programming?

Yes, I guess so.
Comment 8 Beniamino Galvani 2017-06-23 05:38:08 EDT
Patch applied to master and nm-1-8.

https://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=92fc10918337f45ef5eb80bb663a8916894110fe

Thanks for the detailed bug report!
Comment 10 Vladimir Benes 2017-12-08 10:42 EST
Created attachment 1364944 [details]
this doesn't work as those tests are written
Comment 11 Vladimir Benes 2017-12-08 10:43:38 EST
Not sure if the fix is present in NetworkManager-1.10.0-1.el7.x86_64
Comment 12 Beniamino Galvani 2017-12-18 09:14:24 EST
All 3 test cases pass with NetworkManager-1.10.2-3.el7.
Comment 14 Vladimir Benes 2018-01-15 04:59:04 EST
3 tests running in CI for some time already, working well, no issues seen.

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