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
Statut:
Fermé
Priorité:
Normal
Assigné à:
Version cible:
Début:
15/10/2018
Echéance:
% réalisé:
100%
Temps estimé:
2.00 h
Restant à faire (heures):
0.0
Description
Autrement il y a conflit avec le service ntpdate.service.
Révisions associées
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
Historique
#1 Mis à jour par Daniel Dehennin il y a plus de 7 ans
- Sujet changé de Le service NTP doit attendre que le réseau soit opérationnel à Le service NTP doit attendre que l’heure soit synchronisée
- Description mis à jour (diff)
#2 Mis à jour par Daniel Dehennin il y a plus de 7 ans
- Assigné à mis à Daniel Dehennin
#3 Mis à jour par Daniel Dehennin il y a plus de 7 ans
- Statut changé de Nouveau à En cours
#4 Mis à jour par Daniel Dehennin il y a plus de 7 ans
- % réalisé changé de 0 à 100
- Restant à faire (heures) changé de 2.0 à 0.25
#5 Mis à jour par Daniel Dehennin il y a plus de 7 ans
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 Mis à jour par Scrum Master il y a plus de 7 ans
- Statut changé de En cours à Résolu
#7 Mis à jour par Laurent Flori il y a plus de 7 ans
- Statut changé de Résolu à Fermé
- Restant à faire (heures) changé de 0.25 à 0.0