Bug 592095

Summary: netfs scripts doesn't wait for networkmanager startup
Product: Red Hat Enterprise Linux 6 Reporter: Bill Nottingham <notting>
Component: initscriptsAssignee: initscripts Maintenance Team <initscripts-maint-list>
Status: CLOSED CURRENTRELEASE QA Contact: Miroslav Vadkerti <mvadkert>
Severity: medium Docs Contact:
Priority: low    
Version: 6.0CC: azelinka, iarlyy, jonathan, mvadkert, notting, plautrba, rth, rvokal
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: initscripts-9.03.8-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 589710 Environment:
Last Closed: 2010-11-10 20:40:21 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 589710    
Bug Blocks:    

Description Bill Nottingham 2010-05-13 20:19:38 UTC
+++ This bug was initially created as a clone of Bug #589710 +++

Description of problem:
The ntpdate and netfs scripts (at least) run before NetworkManager
has configured networking.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Have a system network connection
2a. Have an nfs filesystem in /etc/fstab
2b. Have ntpdate run, possibly with a fqdn in /etc/ntp/step-tickers
3. Boot on a machine with sufficient cores to get the services starting
   up all at once.  I have 8 cores here.

Actual results:
ntpdate and nfs report [FAILED] due to nfs lookup failures.

Additional info:
Adding /usr/bin/nm-online -q somewhere in the scripts is probably the
right thing to do to delay their execution until the network comes up.
Although surely some sort of error checks are warrented as well.

--- Additional comment from rth@redhat.com on 2010-05-06 14:08:02 EDT ---

Gah. s/nfs/dns/ lookup failures.

--- Additional comment from notting@redhat.com on 2010-05-06 15:18:02 EDT ---

netfs has a /etc/NetworkManager/dispatcher.d dispatcher script that kicks it once NM has an address. I don't think ntp does.

netfs also has a check:
        [ ! -f /var/lock/subsys/network ] && [ ! -f /var/lock/subsys/NetworkManager ] && exit 0

but that doesn't mean the address is configured, of course.

--- Additional comment from rth@redhat.com on 2010-05-06 16:46:17 EDT ---

Perhaps we could add a "nm-online -x" check to the end of that test sequence
(and possibly move that whole sequence into /etc/init.d/functions)?  That
might at least make the initial running of S25netfs exit properly.

The state of affairs at the moment is somewhat disconcerting...

--- Additional comment from rth@redhat.com on 2010-05-06 16:54:09 EDT ---

... Something like

__networking_enabled() {
  if [ -f /var/lock/subsys/network ]; then
    exit 0
  if [ ! -f /var/lock/subsys/NetworkManager ]; then
    exit 0
  /usr/bin/nm-online -x

    __networking_enabled || exit 0

Comment 2 RHEL Program Management 2010-05-13 21:40:33 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for

Comment 4 Miroslav Vadkerti 2010-09-24 08:16:09 UTC
VERIFIED as fixed in initscripts-9.03.17-1.el6.

netfs now doesn't fail at boot. Though ntpdate still does. I assume according to comments this is expected.

[No mention of Mounting NFS filesystems]
ntpdate: Synchronizing with time server:        [FAILED]

OLD PACKAGE initscripts-9.03.5-1.el6:
Mounting NFS filesystems:  mount.nfs: Failed to resolve server nest.test.redhat.com: Name or service not known
mount.nfs: Failed to resolve server curly.devel.redhat.com: Name or service not known
ntpdate: Synchronizing with time server:                   [FAILED]

Comment 5 releng-rhel@redhat.com 2010-11-10 20:40:21 UTC
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.