https://bugzilla.novell.com/show_bug.cgi?id=337075
User martin.burnicki@meinberg.de added comment
https://bugzilla.novell.com/show_bug.cgi?id=337075#c16
Martin Burnicki changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEEDINFO |NEW
Info Provider|martin.burnicki@meinberg.de |
--- Comment #16 from Martin Burnicki 2007-12-14 06:10:11 MST ---
Michael,
sorry for the delay. I didn't get to this time consuming tests earlier.
The special network setup I mentioned in my previous comment was related to
some tests with an additional USB network interface. When this interface had
been configured with yast then the bootscripts waited for that "mandatory
interface", and if that USB device was not plugged in at startup the scripts
returned an error. I was in doubt whether this would affect ntpd startup, or
not.
I've now tested with a fresh 10.3 installation once more. Here's an updated
summary of the tests on 2 machines:
1.) a standard AMD64/x86_64 machine with a PCI network card, using ifup method
2.) a i386 laptop using network manager
First removed ntp RPMs which have been shipped witht he distribution, and
removed all ntp files below /etc. Then installed new RPMs (ntp-4.2.4p4-34.1.*)
from your download page, which are newer than the version I had tested for my
previous comment.
Looks like the RPMs now install a file /etc/ntp.servers to avoid the error
messages I mentioned earlier. However, the rcntp script still uses a file
/etc/ntp.server (without 's'), so the /etc/ntp.servers file is simply ignored
and the error messages persist:
# rcntp start
Starting network time protocol daemon (NTPD)cp: cannot stat `/etc/ntp.server':
No such file or directory
grep: /etc/ntp.server: No such file or directory
done
Then tried:
# rcntp addserver 0.pool.ntp.org
mv: cannot stat `/etc/ntp.server': No such file or directory
/usr/sbin/rcntp: line 205: /etc/ntp.server~: No such file or directory
Anyway, after the command "addserver" command has been run the file
/etc/ntp.server exists and contains the server line.
The next command
# rcntp addserver 1.pool.ntp.org
works correctly and doesn't give an error.
I'd propose to use the name /etc/ntp.servers, and thus fix the rcntp script to
use this name.
In order to speed up synchronization the "iburst" keyword should be used with
each server. I can't imagine any case where this would not be useful.
A question is whether it's wiser to let that keyword be added automatically by
the "addserver" function in the rc script, or whether it should be supplied on
the command line for the rc script. E.g. if I run
rcntp addserver 0.pool.ntp.org iburst
then the "iburst" keyword is added to the server line in /etc/ntp.server.
When I restart ntpd using the rcntp script then synchronization is pretty fast.
Then I've activated ntp using yast's runlevel editor since otherwise ntpd would
not be started after reboot, and restarted both machines with network cables
plugged in.
Using the ipup method, ntpd starts fine after reboot. On the laptop, however,
the ntpq -p billboard shows only an entry for the local clock, not for the
configured servers.
I think the problem here is that the network interface appears later, when it
has been started by the network manager.
The actual version of ntpd scans dynamically for network interfaces. However,
this happens at an interval which is 5 minutes by default, and can be
configured for as small a 60 seconds, it the parameter "-U 60" is given on
ntpd's command line. You can see in the log messages when ntpd has discovered
the new interface.
So the "addserver" command is applied after the network interface has been
initialized, but before it has been recognized by the running ntpd. As already
mentioned before, I think a proper solution could be to send a signal to ntpd
when a new network interface becomes available so that ntpd can discover it,
and then run the addserver commands. Unfortunately ntpd does not support that
kind of signalling, yet.
If I run "rcntp addserver 2.pool.ntp.org iburst" after ntpd has discovered the
network interface then the new server association appears in the ntpq billboard
and ntpd quickly synchronizes to it (due to the "iburst" keyword).
If I run "rcntp restart" on the laptop after the new network interface is up
then everything works fine, too.
I've also noticed that now "ntpq -p" is run for "rcntp status". That's fine.
I'll keep on trying to find a better solution for the usage with network
manager. Maybe for now you could handle the two cases differently: For if-up
as-is, and for NM restart ntpd after the first network interface has become
available.
What's to be done is fix the name of the ntp.server(s) file in rcntpd, and
modify apparmor according to the new needs. Also the yast module for ntp should
be adapted.
(see also bug #334206, https://bugzilla.novell.com/show_bug.cgi?id=334206)
Martin
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.