Bug 589710 - ntpdate and netfs scripts don't wait for networkmanager startup
ntpdate and netfs scripts don't wait for networkmanager startup
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: initscripts (Show other bugs)
13
All Linux
low Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Fedora Extras Quality Assurance
:
Depends On:
Blocks: 592095
  Show dependency treegraph
 
Reported: 2010-05-06 14:06 EDT by Richard Henderson
Modified: 2014-03-16 23:23 EDT (History)
5 users (show)

See Also:
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 14:46:14 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Richard Henderson 2010-05-06 14:06:00 EDT
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 14:08:02 EDT
Gah. s/nfs/dns/ lookup failures.
Comment 2 Bill Nottingham 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.
Comment 3 Richard Henderson 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...
Comment 4 Richard Henderson 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 5 Bill Nottingham 2010-05-13 16:23:29 EDT
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 15:32:41 EDT
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 14:14:25 EDT
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 14:45:39 EDT
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.

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