Bug 30198 - Default Timeserver
Summary: Default Timeserver
Status: CLOSED FIXED
Alias: None
Product: UCS
Classification: Unclassified
Component: NTP
Version: UCS 3.1
Hardware: Other Linux
: P5 enhancement
Target Milestone: UCS 3.1-1
Assignee: Arvid Requate
QA Contact: Felix Botner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-29 12:15 CET by Stefan Gohmann
Modified: 2013-03-25 19:56 CET (History)
1 user (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Customer ID:
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Gohmann univentionstaff 2013-01-29 12:15:44 CET
We should set a default timeserver during the UCS installation.

Without a configured external timeserver the w32tm service under windows was not able to accept the S4 PDC emulator as a trust-able time server.
Comment 1 Janek Walkenhorst univentionstaff 2013-01-29 13:35:57 CET
See also Bug #27728 and Bug #23266
Comment 2 Arvid Requate univentionstaff 2013-02-23 19:39:38 CET
univention-base-files now installs a script univention-default-ntp-pool which outputs the name of a ntp pool most suitable for the current timezone. This script is employed in the postinst to initialize the three timeserver variables in case any of them is not set. The changelog provides advice to set the variables e.g. to an empty string to avoid these defaults.
Comment 3 Arvid Requate univentionstaff 2013-02-26 17:59:18 CET
Reverted changes of Comment 2, as *.pool.ntp.org must not be shipped as default by software vendors.

Went back to analyze the original problem of windows clients not synchronizing time with Samba4 DCs, and it seems that the w32tm implementation does not fully support responses of ntp server that have a local stratum > 9. This is visible e.g. in the following output of "w32tm /query /peers /verbose":
================================================
Anzahl Peers: 1

Peer: master10.arucs31i0.qa
Status: Aktiv
Verbleibende Zeit: 618.4000000s
Modus: 3 (Client)
Stratum: 0 (nicht angegeben)   ## should output 11, not "unspecified"
PeerAbrufintervall: 0 (nicht angegeben)
HostAbrufintervall: 10 (1024s)
Letzte erfolgr. Synchronisierungszeit: (null)
Letzter Synchronisierungsfehler: 0x800705B4 (Dieser Vorgang wurde wegen Zeitüberschreitung zurückgegeben. )
Letzte Synchronisierungsfehlermeldungs-ID: 0x00000000 (Erfolgreich)
Auth-Typnachricht-ID: 0x0000005B (NtDigest )
Auflösungsversuche: 0
Gültiger Datenzähler: 1
Erreichbarkeit: 2
================================================

We now reduce the local stratum in the ntp.conf of a master to 5 and on other UCS roles we set it to 9, maintaining the approximate offset to the master.

Output:

Peer: master10.arucs31i0.qa
Status: Aktiv
Verbleibende Zeit: 861.6196000s
Modus: 3 (Client)
Stratum: 6 (Sekundärreferenz - synchr. über (S)NTP)
PeerAbrufintervall: 10 (1024s)

And, after stopping the ntp server on the master and after about four calls to "w32tm /resync /rediscover" and "w32tm /query /peers /verbose" in turn, the Windows 7 Client hooked on to the slave:


Peer: slave12.arucs31i0.qa
Status: Aktiv
Verbleibende Zeit: 1003.6256895s
Modus: 3 (Client)
Stratum: 10 (Sekundärreferenz - synchr. über (S)NTP)
PeerAbrufintervall: 17 (außerhalb des zulässigen Bereichs)


It seems to be irrelevant if the ntp server is still in "freq_sync" state or already in "clock_sync" state. The "PeerPoll Interval: 17" warning message above seemed to vanish after another call to "w32tm /resync".

Updated changelog-3.1-1.
Comment 4 Felix Botner univentionstaff 2013-03-18 16:32:37 CET
UCS slave update to 3.1-1, then univention-samba4 was installed.

NTP service is not usable from windows because /var/lib/samba/ntp_signd has wrong permissions.

ls -la  /var/lib/samba/ntp_signd
insgesamt 8
drwxr-x--- 2 root root 4096 18. Mär 15:41 .
drwxr-xr-x 9 root root 4096 18. Mär 15:12 ..
srwxrwxrwx 1 root root    0 18. Mär 15:41 socket
Comment 5 Arvid Requate univentionstaff 2013-03-18 18:23:02 CET
univention-samba4.postinst now checks group access rights for the nt_socket directory during installations as well as updates.
Comment 6 Felix Botner univentionstaff 2013-03-19 13:30:33 CET
OK 

Changelog entry exists.
Comment 7 Stefan Gohmann univentionstaff 2013-03-25 19:56:56 CET
UCS 3.1-1 has been released: 
 http://download.univention.de/doc/release-notes-3.1-1_en.pdf
 http://download.univention.de/doc/release-notes-3.1-1.pdf

If this error occurs again, please use "Clone This Bug".