Bug 589710

Summary: ntpdate and netfs scripts don't wait for networkmanager startup
Product: [Fedora] Fedora Reporter: Richard Henderson <rth>
Component: initscriptsAssignee: Bill Nottingham <notting>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 13CC: iarlyy, jonathan, notting, plautrba, rvokal
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: initscripts-9.12.1-1.fc13 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 592095 (view as bug list) Environment:
Last Closed: 2010-07-01 18:46:14 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:    
Bug Blocks: 592095    

Description Richard Henderson 2010-05-06 18:06:00 UTC
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.

Comment 1 Richard Henderson 2010-05-06 18:08:02 UTC
Gah. s/nfs/dns/ lookup failures.

Comment 2 Bill Nottingham 2010-05-06 19:18:02 UTC
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.

Comment 3 Richard Henderson 2010-05-06 20:46:17 UTC
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...

Comment 4 Richard Henderson 2010-05-06 20:54:09 UTC
... 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 5 Bill Nottingham 2010-05-13 20:23:29 UTC
http://git.fedorahosted.org/git/?p=initscripts.git;a=commitdiff;h=c27b7f0978cc3bf809667d7cad1d75b8d2e55134

Will be in 9.13-1 (rawhide) and a future F-13 update at some point.

Comment 6 Fedora Update System 2010-06-24 19:32:41 UTC
initscripts-9.12.1-1.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/initscripts-9.12.1-1.fc13

Comment 7 Fedora Update System 2010-06-25 18:14:25 UTC
initscripts-9.12.1-1.fc13 has been pushed to the Fedora 13 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update initscripts'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/initscripts-9.12.1-1.fc13

Comment 8 Fedora Update System 2010-07-01 18:45:39 UTC
initscripts-9.12.1-1.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.