Re: NTP fails synchronization with server at startup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2007-12-06 at 22:46 +0000, Paul Smith wrote:
> On Dec 6, 2007 9:45 PM, Phil Meyer <pmeyer@xxxxxxxxxxxxxxxx> wrote:
> > > I have NTP configured to synchronize with a server at startup, but it
> > > always fails that as reported by F8 during the booting.
> > > Notwithstanding:
> > >
> > > # /sbin/service ntpd restart
> > > Shutting down ntpd:                                        [  OK  ]
> > > ntpd: Synchronizing with time server:                      [  OK  ]
> > > Starting ntpd:                                             [  OK  ]
> > > #
> > >
> > > Any ideas?
> > >
> > > Thanks in advance,
> > >
> > > Paul
> > >
> > >
> >
> > I have read through the thread, but I don't see mention of using
> > NetworkManager to start ntpd for you.
> >
> > NetworkManager, as has been discussed, was designed to start interfaces
> > upon user login. This is especially useful for laptops and systems that
> > get moved around alot and have more than one user account. Thus, users
> > do not need to allow access to private networks that other users do not
> > need.
> >
> > What has not been discussed, is NetworkManagers ability to start any/all
> > network based services when a user logs in.
> >
> > This is somewhat similar to domain lofins, if that helps explain it.
> > Basically, a script, or group of scripts can/will be run when a user
> > logs in.
> >
> > These can range from:
> > service start ntpd
> > to
> > mount server:/home/myhome/data /home/myhome/data
> >
> > These scripts can run as any user, since they are executed as root in
> > the first place.
> >
> > To resolve the OPs issue, create two simple scripts. One for startup,
> > one for stopping ntpd. You can also specify these by interface. For
> > instance: eth0=wired and eth1=wireless. Perhaps I only want nptd running
> > when on the wired connection because I use the wireless mostly in an
> > ad-hoc network, or for wardriving.
> >
> > Lets assume for these examples that we want ntpd to start every time
> > NetworManager brings up eth0, and turn it off whenever NetworkManager
> > turns off eth0.
> >
> > Add this script (ore make one like it to suit your needs) to the
> > /etc/NetworkManager/dispatcher.d/ directory.
> >
> > #!/bin/sh
> >
> > # scripts in the /etc/NetworkManager/dispatcher.d/ directory
> > # are called alphabetically and are passed two parameters:
> > # $1 is the interface name, and $2 is "up" or "down"
> >
> > if [ "$1" = "eth0" ]
> > then
> > if [ "$2" = "up" ]
> > then
> > /sbin/service ntpd start
> > fi
> > if [ "$2" = "down" ]
> > then
> > /sbin/service ntpd stop
> > fi
> > fi
> >
> > I call it ntpd.
> > # chmod 755 ntpd
> >
> > Now pull the wired plug, and then plug it back in. ntpd should be running.
> >
> > It will be most useful using this method to:
> >
> > # /sbin/chkconfig ntpd off
> >
> > All services you want NetworkManager to 'manage' need to be set to off
> > mode based on run level.
> >
> > Good Luck!
> 
> Thanks to all for all answers and help. Can this problem be considered
> a bug of F8? If yes, in which component should one file the bug at
> Bugzilla?

It's not really a bug.  The problem is that there's two competing
mechanisms for network management.  NetworkManager is primarily used
for mobile installations (e.g. laptops and such), whereas the the
normal stuff (/etc/rc.d/rcX.d/S10network) is used for more fixed
locations.

The startup scripts could be modified to see which was the case, but
that'd have to be extended to all services that were dependent on the
network.  On my F7 machine, that's at least 31 services (NFS, RPC, ntpd,
iptables, avahi, mail, NIS, lots of stuff).

Alternately, the %post part of the NetworkManager RPM could add entries
to /etc/NetworkManager/dispatcher.d and "chkconfig off" the services.  A
utility could also be written that did it (e.g. "nmconfig --enable" or
"nmconfig --disable", possibly with a GUI front end as well).

Perhaps an "enhancement request" filed against NetworkManager in
bugzilla would meet with a favorable response.

----------------------------------------------------------------------
- Rick Stevens, Principal Engineer             rstevens@xxxxxxxxxxxx -
- CDN Systems, Internap, Inc.                http://www.internap.com -
-                                                                    -
-   Sarchasm: The gulf between the author of sarcastic wit and the   -
-                     reader...who doesn't get it.                   -
----------------------------------------------------------------------


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux