Bug 592095 - netfs scripts doesn't wait for networkmanager startup
Summary: netfs scripts doesn't wait for networkmanager startup
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: initscripts
Version: 6.0
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: initscripts Maintenance Team
QA Contact: Miroslav Vadkerti
URL:
Whiteboard:
Depends On: 589710
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-05-13 20:19 UTC by Bill Nottingham
Modified: 2014-03-17 03:23 UTC (History)
8 users (show)

Fixed In Version: initscripts-9.03.8-1
Doc Type: Bug Fix
Doc Text:
Clone Of: 589710
Environment:
Last Closed: 2010-11-10 20:40:21 UTC
Target Upstream Version:


Attachments (Terms of Use)

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):
initscripts-9.12-1.fc13.x86_64
ntpdate-4.2.6p1-1.fc13.x86_64

How reproducible:
Always

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:
   start)
        [ ! -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
  fi
  if [ ! -f /var/lock/subsys/NetworkManager ]; then
    exit 0
  fi
  /usr/bin/nm-online -x
}

...
  start)
    __networking_enabled || exit 0

Comment 2 RHEL Product and 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
inclusion.

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.

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

OLD PACKAGE initscripts-9.03.5-1.el6:
[snip]
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
                                                           [FAILED]
[snip]
ntpdate: Synchronizing with time server:                   [FAILED]
[snip]

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.


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