Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1520826

Summary: [NMCI] run_once_helper_for_localhost_localdomain test failed
Product: Red Hat Enterprise Linux 7 Reporter: Beniamino Galvani <bgalvani>
Component: NetworkManagerAssignee: Beniamino Galvani <bgalvani>
Status: CLOSED ERRATA QA Contact: Desktop QE <desktop-qa-list>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.5CC: atragler, bgalvani, fgiudici, lmiksik, lrintel, rkhan, sukulkar, thaller, vbenes
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-04-10 13:35:58 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:
Attachments:
Description Flags
[PATCH] device: increase carrier wait time to 6 seconds none

Description Beniamino Galvani 2017-12-05 09:19:05 UTC
run_once_helper_for_localhost_localdomain CI test:

* Bring " up " connection " testeth0 "
* Disconnect device " eth0 "
* Execute " sleep 2 "
* Stop NM and clean " eth0 "
When " state DOWN " is visible with command " ip a s eth0 " in " 5 " seconds
* Execute " hostnamectl set-hostname localhost.localdomain "
* Execute " echo '[main]' > /etc/NetworkManager/conf.d/01-run-once.conf "
* Execute " echo 'configure-and-quit=yes' >> /etc/NetworkManager/conf.d/01-run-once.conf "
* Execute " echo 'dhcp=internal' >> /etc/NetworkManager/conf.d/01-run-once.conf "
* Execute " sleep 1 "
* Start NM
Then " eth0 " is visible with command " ps aux|grep helper " in " 40 " seconds

Exception: Did not see the pattern eth0 in 40 seconds

Comment 2 Beniamino Galvani 2017-12-05 09:30:56 UTC
eth0 takes more than 5 seconds to establish the link:

 [ 9567.500248] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
 [ 9572.988977] e1000e: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: Rx/Tx
 [ 9572.997228] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

NetworkManager wait at most 5 seconds and then declares
'startup-complete', which also quits the daemon when using
configure-and-quit.

A job from last week shows a ethernet bring-up delay of less than 4
seconds:

 [ 9587.836386] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
 [ 9591.386913] e1000e: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: Rx/Tx
 [ 9591.395072] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

Vladimir, were there any changes in the hardware setup?

In the last git version of NM it is possible to increase the
wait-carrier timeout adding the following to a configuration snippet:

 [device]
 match-device=interface-name:eth0
 carrier-wait-timeout=8000

Maybe we should consider doing that for CI tests?

Comment 3 Vladimir Benes 2018-01-02 16:27:33 UTC
Sushil,
we have workaround in place as suggested

 [device]
 match-device=interface-name:eth0
 carrier-wait-timeout=8000

so it's not clear to me if this is bug or not

Comment 4 Beniamino Galvani 2018-01-05 15:32:28 UTC
The default setting (5 seconds) should work out of the box in most cases. If it doesn't work on test machines with standard HW and NICs, I think it would be better to increase the timeout. So, I think this is a bug (though I don't know why it used to work before).

Comment 5 Beniamino Galvani 2018-01-05 15:34:19 UTC
(In reply to Beniamino Galvani from comment #4)
> The default setting (5 seconds) should work out of the box in most cases. If
> it doesn't work on test machines with standard HW and NICs, I think it would
> be better to increase the timeout.

I mean, it would be better to increase the *default* timeout, and not using the workaround from comment 3.

Comment 6 Beniamino Galvani 2018-01-05 16:03:38 UTC
Created attachment 1377547 [details]
[PATCH] device: increase carrier wait time to 6 seconds

Comment 7 Thomas Haller 2018-01-16 13:03:10 UTC
(In reply to Beniamino Galvani from comment #6)
> Created attachment 1377547 [details]
> [PATCH] device: increase carrier wait time to 6 seconds

lgtm

Comment 11 Vladimir Benes 2018-02-02 11:06:15 UTC
Any idea what can be the cause of this failure? In case I have veth devices present in the test environment the test occasionally fails. Eth0 that is used is never veth. It is always real device. This has something to do with computer performance as it's mostly visible on older Pentium 4 based machines.

This is fixed as the timeout is 6 seconds now. Should we track the device's delay via another bug as a future material?

Comment 12 Vladimir Benes 2018-02-09 14:12:29 UTC
this delay was enlarged to 6 but sometimes it's even not enough for some devices, we think it's dependant on device to switch communication. This has nothing more to verify.

Comment 15 errata-xmlrpc 2018-04-10 13:35:58 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, 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-2018:0778