Merge lp:~paelzer/serverguide/serverguide-ntp-clarification into lp:serverguide/trunk

Proposed by Christian Ehrhardt 
Status: Merged
Merged at revision: 337
Proposed branch: lp:~paelzer/serverguide/serverguide-ntp-clarification
Merge into: lp:serverguide/trunk
Diff against target: 231 lines (+96/-68)
1 file modified
serverguide/C/network-config.xml (+96/-68)
To merge this branch: bzr merge lp:~paelzer/serverguide/serverguide-ntp-clarification
Reviewer Review Type Date Requested Status
Doug Smythies Approve
Review via email: mp+326283@code.launchpad.net

Description of the change

Improve NTP/Timesyncd content and separation in the serverguide (LP: #1604010)

To post a comment you must log in.
Revision history for this message
Doug Smythies (dsmythies) wrote :

This all looks good. However...

The non-ascii character check fails:

$ scripts/ascii_checker.py --only-matching --encoding ascii serverguide/C/*.xml
  1111: ��� systemd-timesyncd.service - Network Time Synchronization

  1114: ������disable-with-time-daemon.conf

  1123: ������12379 /lib/systemd/systemd-timesyncd

--------------------------------------------------------------------------------
2018 lines in 'serverguide/C/network-config.xml', thereof 3 lines with non-ASCII characters.

and, the PDF compile has issues:

[INFO] FOUserAgent - Rendered page #53.
[INFO] FOUserAgent - Rendered page #54.
[WARN] FOUserAgent - Glyph "●" (0x25cf, H18533) not available in font "Courier".
[WARN] FOUserAgent - Glyph "└" (0x2514, SF020000) not available in font "Courier".
[WARN] FOUserAgent - Glyph "─" (0x2500, SF100000) not available in font "Courier".
[INFO] FOUserAgent - Rendered page #55.
[INFO] FOUserAgent - Rendered page #56.

I will change those characters to ASCII to try to achieve a similar look to the original output.

See also:
https://wiki.ubuntu.com/DocumentationTeam/SystemDocumentation/Repository/Members-Serverguide#ASCII_Policy

review: Approve
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Thanks Doug,
it was a copy and paste form my terminal and so I didn't realize I had to
postprocess it.
Thanks for fixing it up and the link to the ascii policy - I hope I do
better on these details next time!

On Sun, Jul 2, 2017 at 7:42 PM, <email address hidden> wrote:

> The proposal to merge lp:~paelzer/serverguide/serverguide-ntp-clarification
> into lp:serverguide has been updated.
>
> Status: Needs review => Merged
>
> For more details, see:
> https://code.launchpad.net/~paelzer/serverguide/
> serverguide-ntp-clarification/+merge/326283
> --
> You are the owner of lp:~paelzer/serverguide/
> serverguide-ntp-clarification.
>

--
Christian Ehrhardt
Software Engineer, Ubuntu Server
Canonical Ltd

Revision history for this message
Doug Smythies (dsmythies) wrote :

> it was a copy and paste from my terminal and so
> I didn't realize I had to postprocess it.
> Thanks for fixing it up and the link to the ascii
> policy - I hope I do better on these details next time!

The non ASCII character thing rarely comes up.
The notes about it are on the "how to be a doc committer for serverguide" wiki page, and not the "how to contribute to the serverguide" wiki page. Perhaps I should add a note on the latter wiki page pointing to the former wiki page.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'serverguide/C/network-config.xml'
2--- serverguide/C/network-config.xml 2017-03-15 10:13:19 +0000
3+++ serverguide/C/network-config.xml 2017-06-26 10:19:18 +0000
4@@ -1055,7 +1055,7 @@
5 </sect1>
6
7 <sect1 id="NTP" status="review">
8- <title>Time Synchronisation with NTP</title>
9+ <title>Time Synchronisation</title>
10 <para>
11 NTP is a TCP/IP protocol for synchronising time over a network. Basically a client requests the current time from a server, and uses it to set its own clock.
12 </para>
13@@ -1063,92 +1063,103 @@
14 Behind this simple description, there is a lot of complexity - there are tiers of NTP servers, with the tier one NTP servers connected to atomic clocks, and tier two and three servers spreading the load of actually handling requests across the Internet. Also the client software is a lot more complex than you might think - it has to factor out communication delays, and adjust the time in a way that does not upset all the other processes that run on the server. But luckily all that complexity is hidden from you!
15 </para>
16 <para>
17-Ubuntu uses ntpdate and ntpd.
18+Ubuntu by default uses <emphasis>timedatectl / timesyncd</emphasis> to synchronize time and users can optionally use ntpd to serve network time info.
19 </para>
20
21-<sect2 id="timedatectl" status="review">
22-<title>timedatectl</title>
23- <para>
24- In recent Ubuntu releases <emphasis>timedatectl</emphasis> replaces <emphasis>ntpdate</emphasis>.
25- By default <emphasis>timedatectl</emphasis> syncs the time once on boot and later on uses socket activation to recheck once network connections become active.
26-</para>
27- <para>
28- If <emphasis>ntpdate / ntp</emphasis> is installed <emphasis>timedatectl</emphasis> steps back to let you keep your old setup.
29+<sect2 id="timedate-info" status="review">
30+<title>Synchronizing your systems time</title>
31+ <para>
32+ Starting with Ubuntu 16.04 <emphasis>timedatectl / timesyncd</emphasis> (which are part of systemd) replace most of <emphasis>ntpdate / ntp</emphasis>.
33+ </para>
34+ <para>
35+ <application>timesyncd</application> is available by default and replaces not only <application>ntpdate</application>, but also the client portion of <application>ntpd</application>.
36+ So on top of the one-shot action that <application>ntpdate</application> provided on boot and network activation, now <application>timesyncd</application> by default regularly checks and keeps your local time in sync.
37+ It also stores time updates locally, so that after reboots monotonically advances if applicable.
38+ </para>
39+ <para>
40+ If <application>ntpdate / ntp</application> are installed <application>timedatectl</application> steps back to let you keep your old setup.
41 That shall ensure that no two time syncing services are fighting and also to retain any kind of old behaviour/config that you had through an upgrade.
42 But it also implies that on an upgrade from a former release ntp/ntpdate might still be installed and therefore renders the new systemd based services disabled.
43-</para>
44-</sect2>
45+ </para>
46+ <para>
47+ <application>ntpdate</application> is considered deprecated in favour of <application>timedatectl</application> and thereby no more installed by default.
48+ </para>
49
50-<sect2 id="timesyncd" status="review">
51-<title>timesyncd</title>
52- <para>
53- In recent Ubuntu releases <emphasis>timesyncd</emphasis> replaces the client portion of <emphasis>ntpd</emphasis>.
54- By default <emphasis>timesyncd</emphasis> regularly checks and keeps the time in sync.
55- It also stores time updates locally, so that after reboots monotonically advances if applicable.
56-</para>
57- <para>
58- The current status of time and time configuration via <emphasis>timedatectl</emphasis> and <emphasis>timesyncd</emphasis> can be checked with <emphasis>timedatectl status</emphasis>.
59-</para>
60-<programlisting>
61-timedatectl status
62- Local time: Fri 2016-04-29 06:32:57 UTC
63- Universal time: Fri 2016-04-29 06:32:57 UTC
64- RTC time: Fri 2016-04-29 07:44:02
65- Time zone: Etc/UTC (UTC, +0000)
66+<sect3 id="timedate-config" status="review">
67+<title>Configuring timedatectl and timesyncd</title>
68+ <para>
69+ The current status of time and time configuration via <application>timedatectl</application> and <application>timesyncd</application> can be checked with <command>timedatectl status</command>.
70+ </para>
71+<screen>
72+$ timedatectl status
73+ Local time: Mo 2017-06-26 12:16:16 CEST
74+ Universal time: Mo 2017-06-26 10:16:16 UTC
75+ RTC time: Mo 2017-06-26 10:16:16
76+ Time zone: Europe/Berlin (CEST, +0200)
77 Network time on: yes
78-NTP synchronized: no
79+NTP synchronized: yes
80 RTC in local TZ: no
81-</programlisting>
82- <para>
83- If NTP is installed and replaces the activity of <emphasis>timedatectl</emphasis> the line "NTP synchronized" is set to yes.
84-</para>
85- <para>
86- The nameserver to fetch time for <emphasis>timedatectl</emphasis> and <emphasis>timesyncd</emphasis> from can be specified in /etc/systemd/timesyncd.conf and with flexible additional config files in /etc/systemd/timesyncd.conf.d/.
87-</para>
88-</sect2>
89-
90-<sect2 id="ntpdate" status="review">
91-<title>ntpdate</title>
92- <para>
93- <emphasis>ntpdate</emphasis> is considered deprecated in favour of <emphasis>timedatectl</emphasis> and thereby no more installed by default.
94- If installed it will run once at boot time to set up your time according to Ubuntu's NTP server.
95- Later on anytime a new interface comes up it retries to update the time - while doing so it will try to slowly drift time as long as the delta it has to cover isn't too big.
96- That behaviour can be controlled with the <emphasis>-B/-b</emphasis> switches.
97-</para>
98-<programlisting>
99-ntpdate ntp.ubuntu.com
100-</programlisting>
101+</screen>
102+<para>
103+Via <application>timedatectl</application> an admin can control the timezone, how the system clock should relate to the hwclock and if permanent synronization should be enabled or not.
104+See <command>man timedatectl</command> for more details.
105+</para>
106+<para>
107+ timesyncd itself is still a normal service, so you can check its status also more in detail via.
108+<screen>
109+$ systemctl status systemd-timesyncd
110+● systemd-timesyncd.service - Network Time Synchronization
111+ Loaded: loaded (/lib/systemd/system/systemd-timesyncd.service; enabled; vendor preset: enabled)
112+ Drop-In: /lib/systemd/system/systemd-timesyncd.service.d
113+ └─disable-with-time-daemon.conf
114+ Active: active (running) since Mo 2017-06-26 11:12:19 CEST; 30min ago
115+ Docs: man:systemd-timesyncd.service(8)
116+ Main PID: 12379 (systemd-timesyn)
117+ Status: "Synchronized to time server [2001:67c:1560:8003::c8]:123 (ntp.ubuntu.com)."
118+ Tasks: 2
119+ Memory: 424.0K
120+ CPU: 12ms
121+ CGroup: /system.slice/systemd-timesyncd.service
122+ └─12379 /lib/systemd/systemd-timesyncd
123+
124+Jun 26 11:12:19 lap systemd[1]: Starting Network Time Synchronization...
125+Jun 26 11:12:19 lap systemd[1]: Started Network Time Synchronization.
126+Jun 26 11:12:19 lap systemd-timesyncd[12379]: Synchronized to time server [2001:67c:1560:8003::c8]:123 (ntp.ubuntu.com).
127+</screen>
128+</para>
129+<para>
130+ The nameserver to fetch time for <application>timedatectl</application> and <application>timesyncd</application> from can be specified in <filename>/etc/systemd/timesyncd.conf</filename> and additional config files can be stored in <filename>/etc/systemd/timesyncd.conf.d/</filename>.
131+ The entries for NTP= and FallbackNTP= are space separated lists.
132+</para>
133+</sect3>
134+
135 </sect2>
136
137 <sect2 id="timeservers" status="review">
138- <title>timeservers</title>
139+ <title>Serving NTP</title>
140 <para>
141- By default the systemd based tools request time information at ntp.ubuntu.com.
142- In classic ntpd based service uses the pool of [0-3].ubuntu.pool.ntp.org
143- Of the pool number 2.ubuntu.pool.ntp.org as well as ntp.ubuntu.com also support ipv6 if needed.
144- If one needs to force ipv6 there also is ipv6.ntp.ubuntu.com which is not configured by default.
145+ If on top of synchronizing your system you also want to serve NTP information you need an ntp server. The most classic and supported one is <application>ntpd</application>, but it is also very old so there also are <application>openntpd</application> and <application>chrony</application> as alternatives available in the archive.
146 </para>
147-</sect2>
148
149-<sect2 id="ntpd" status="review">
150+<sect3 id="ntpd" status="review">
151 <title>ntpd</title>
152 <para>
153- The ntp daemon ntpd calculates the drift of your system clock and continuously adjusts it, so there are no large corrections that could
154- lead to inconsistent logs for instance. The cost is a little processing power and memory, but for a modern server this is negligible.
155+ The ntp daemon ntpd calculates the drift of your system clock and continuously adjusts it, so there are no large corrections that could
156+ lead to inconsistent logs for instance. The cost is a little processing power and memory, but for a modern server this is negligible.
157 </para>
158-</sect2>
159-<sect2 id="ntp-installation" status="review">
160+</sect3>
161+
162+<sect3 id="ntp-installation" status="review">
163 <title>Installation</title>
164 <para>
165- To install ntpd, from a terminal prompt enter:
166+ To install ntpd, from a terminal prompt enter:
167 </para>
168-
169 <screen>
170 <command>sudo apt install ntp</command>
171 </screen>
172+</sect3>
173
174-</sect2>
175-<sect2 id="timeservers-conf" status="review">
176+<sect3 id="timeservers-conf" status="review">
177 <title>Configuration</title>
178
179 <para>
180@@ -1173,8 +1184,14 @@
181 <screen>
182 <command>sudo systemctl reload ntp.service</command>
183 </screen>
184-</sect2>
185-<sect2 id="ntp-status" status="review">
186+<para>
187+ Of the pool number 2.ubuntu.pool.ntp.org as well as ntp.ubuntu.com also support ipv6 if needed.
188+ If one needs to force ipv6 there also is ipv6.ntp.ubuntu.com which is not configured by default.
189+</para>
190+
191+</sect3>
192+
193+<sect3 id="ntp-status" status="review">
194 <title>View status</title>
195 <para>
196 Use ntpq to see more info:
197@@ -1190,14 +1207,15 @@
198 +europium.canoni 193.79.237.14 2 u 63 64 337 81.534 -67.968 92.792</computeroutput>
199 </screen>
200
201-</sect2>
202+</sect3>
203
204-<sect2 id="ntp-pps" status="review">
205+<sect3 id="ntp-pps" status="review">
206 <title>PPS Support</title>
207 <para>
208 Since 16.04 ntp supports PPS discipline which can be used to augment ntp with local timesources for better accuracy.
209 For more details on configuration see the external pps ressource listed below.
210 </para>
211+</sect3>
212 </sect2>
213
214
215@@ -1217,6 +1235,16 @@
216 </listitem>
217 <listitem>
218 <para>
219+ <ulink url="https://www.freedesktop.org/software/systemd/man/timedatectl.html">Freedesktop.org info on timedatectl</ulink>
220+ </para>
221+ </listitem>
222+ <listitem>
223+ <para>
224+ <ulink url="https://www.freedesktop.org/software/systemd/man/systemd-timesyncd.service.html#">Freedesktop.org info on systemd-timesyncd service</ulink>
225+ </para>
226+ </listitem>
227+ <listitem>
228+ <para>
229 <ulink url="http://www.ntp.org/ntpfaq/NTP-s-config-adv.htm#S-CONFIG-ADV-PPS">ntp.org faq on configuring PPS</ulink>
230 </para>
231 </listitem>

Subscribers

People subscribed via source and target branches