[ntp:questions] ntp sync and NetworkManger

Danny Mayer mayer at ntp.isc.org
Sat Jun 23 13:48:19 UTC 2007


ramadog at gmail.com wrote:
> Todd Partridge wrote:
>> Fine evening all!  I'm having a little bit of a problem configuring.
>> I not too long back got gentoo running and am real happy with this
>> setup.  One of the first things II noticed is that it doesn't have all
>> the detailed configurations that Ubuntu does.  Recently I've installed
>> NetworkManager which is a beautiful app if you run a laptop, however
>> using this now creates a bootup problem.  Since connectivity to the
>> network doesn't happen till after the desktop is loaded  it nulls the
>> script for ntp at boot time.  I noticed from ntp's man page I noticed
>> you can run ntpdate as a cron-job.  Anyone had any experience with
>> this? would this be the best way recommended?  or perhaps there is a
>> different method I could be doing to sync my clock?
> 
> If you feel like a bit of reading you could look at
> https://bugs.launchpad.net/ubuntu/+source/ntp/+bug/90267
> 
> That is my bug report for ubuntu. It looks like you are running gentoo
> but it might still be relevant. The conclusion near the end is that
> networkmanager might down already running interfaces then bring them
> back up. This gives the effect of network services including ntp being
> started when there is no network. Without network manager everything
> works as expected.
> 

I just looked at this report. It's incorrect. The real problem is that
the DNS lookup is unable to find an address of the name specified in the
config file. That either means that the network is not up or more likely
 that the DNS is not available. This is NOT a NTP issue. I did add code
which is in 4.2.4 that retries the DNS until it gets an answer but once
it gets an NXDOMAIN then it will stop. I forget which bug report that is.

> I came up with a few work arounds with my favourite being I uninstall
> network manager as the first job on very new install I do. Another is
> try a sleep 10 at the top of the ntp init script so ntp is delayed
> enough for network manager to do its job.
> 

It's not the network you need to wait for. It's DNS. If you don't get a
positive response from DNS you won't be able to run NTP with names in
the server line in the config line.

Danny



More information about the questions mailing list