Tâche #25562
Scénario #25457: La gestion de la mise à l’heure du serveur doit être fonctionnelle sur 2.7.0
Le service NTP doit attendre que l’heure soit synchronisée
Status:
Fermé
Priority:
Normal
Assigned To:
Target version:
Start date:
10/15/2018
Due date:
% Done:
100%
Estimated time:
2.00 h
Remaining (hours):
0.0
Description
Autrement il y a conflit avec le service ntpdate.service
.
Associated revisions
We want NTP to start only after the forced time synchronisation
As the NTP service can not be used in the same time as “ntpdate”.
- systemd/ntp.service.d/override.conf: start the service after
“time-sync.target”.
- eole-common.mk: install new override.
Ref: #25562
Package “ntp.service” override in “eole-server”
Ref: #25562
Fix ntp.service override file path
Ref: #25562
History
#1 Updated by Daniel Dehennin almost 5 years ago
- Subject changed from Le service NTP doit attendre que le réseau soit opérationnel to Le service NTP doit attendre que l’heure soit synchronisée
- Description updated (diff)
#2 Updated by Daniel Dehennin almost 5 years ago
- Assigned To set to Daniel Dehennin
#3 Updated by Daniel Dehennin almost 5 years ago
- Status changed from Nouveau to En cours
#4 Updated by Daniel Dehennin almost 5 years ago
- % Done changed from 0 to 100
- Remaining (hours) changed from 2.0 to 0.25
#5 Updated by Daniel Dehennin almost 5 years ago
Pour tester¶
Le service ntp.service
doit avoir une surcharge de configuration active¶
root@scribe:~# systemctl cat ntp.service # /lib/systemd/system/ntp.service [Unit] Description=Network Time Service Documentation=man:ntpd(8) After=network.target Conflicts=systemd-timesyncd.service [Service] Type=forking # Debian uses a shell wrapper to process /etc/default/ntp # and select DHCP-provided NTP servers if available ExecStart=/usr/lib/ntp/ntp-systemd-wrapper PrivateTmp=true [Install] WantedBy=multi-user.target # /etc/systemd/system/ntp.service.d/override.conf [Unit] After=time-sync.target Wants=time-sync.target
Le service ntp.service
doit être démarré¶
root@scribe:~# systemctl status ntp.service ● ntp.service - Network Time Service Loaded: loaded (/lib/systemd/system/ntp.service; enabled; vendor preset: enabled) Drop-In: /etc/systemd/system/ntp.service.d └─override.conf Active: active (running) since Mon 2018-10-15 17:02:11 CEST; 9min ago Docs: man:ntpd(8) Process: 1520 ExecStart=/usr/lib/ntp/ntp-systemd-wrapper (code=exited, status=0/SUCCESS) Main PID: 1555 (ntpd) Tasks: 2 (limit: 4915) CGroup: /system.slice/ntp.service └─1555 /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 114:120 oct. 15 17:02:33 scribe ntpd[1555]: Listen normally on 5 br0 192.0.2.1:123 oct. 15 17:02:33 scribe ntpd[1555]: new interface(s) found: waking up resolver oct. 15 17:03:19 scribe ntpd[1555]: Soliciting pool server 83.168.200.198 oct. 15 17:04:25 scribe ntpd[1555]: Soliciting pool server 213.36.7.21 oct. 15 17:05:31 scribe ntpd[1555]: Soliciting pool server 85.21.78.91 oct. 15 17:06:35 scribe ntpd[1555]: Soliciting pool server 95.81.173.74 oct. 15 17:07:42 scribe ntpd[1555]: Soliciting pool server 130.60.164.150 oct. 15 17:08:49 scribe ntpd[1555]: Soliciting pool server 94.16.116.137 oct. 15 17:09:53 scribe ntpd[1555]: Soliciting pool server 194.102.58.173 oct. 15 17:11:00 scribe ntpd[1555]: Soliciting pool server 31.130.200.24
Le démarrage doit se faire après que ntpdate.service
soit terminé, c’est à dire après time-sync.target
¶
Voir l’image boot.svg
dans le scénario #25457.
#6 Updated by Scrum Master almost 5 years ago
- Status changed from En cours to Résolu
#7 Updated by Laurent Flori almost 5 years ago
- Status changed from Résolu to Fermé
- Remaining (hours) changed from 0.25 to 0.0