Project

General

Profile

Tâche #25561

Scénario #25457: La gestion de la mise à l’heure du serveur doit être fonctionnelle sur 2.7.0

Forcer la synchronisation de l’heure au démarrage du système

Added by Daniel Dehennin almost 5 years ago. Updated almost 5 years ago.

Status:
Fermé
Priority:
Normal
Assigned To:
Start date:
10/15/2018
Due date:
% Done:

100%

Estimated time:
2.00 h
Remaining (hours):
0.0

Description

Avant de démarrer des services comme MySQL nous devons être sûr que le système est à l’heure.

Un environnement virtualisé mal configuré peut appliquer un décalage de l’horloge « matérielle virtuelle » si l’heure de l’hôte relative au fuseau horaire est considérée comme UTC par le système virtualisé.

Le service ntp ne permet pas de changer l’heure brutalement au démarrage, il faut donc un service dédié qui s’exécute juste après que le réseau soit opérationnel.

Associated revisions

Revision 3cdc51ef (diff)
Added by Daniel Dehennin almost 5 years ago

We need to force time synchronisation as early as possible at boot

Otherwise some service like MySQL will not be happy when the time goes
backward.

This service pull the “time-sync.target” used by the time sentible
services.

  • init/ntpdate.service: new service to call “ntpdate” when the network
    is fully configured.

Ref: #25561

Revision 9647443d (diff)
Added by Daniel Dehennin almost 5 years ago

Package “ntpdate.service” in “eole-server”

Ref: #25561

History

#1 Updated by Daniel Dehennin almost 5 years ago

  • Status changed from Nouveau to En cours
  • Assigned To set to Daniel Dehennin

#2 Updated by Daniel Dehennin almost 5 years ago

  • % Done changed from 0 to 100
  • Remaining (hours) changed from 2.0 to 0.25

#3 Updated by Daniel Dehennin almost 5 years ago

Pour tester

Le service ntpdate.service doit être démarré

systemctl status ntpdate.service
● ntpdate.service - Force synchronisation of time
   Loaded: loaded (/etc/systemd/system/ntpdate.service; enabled; vendor preset: enabled)
   Active: active (exited) since Mon 2018-10-15 17:02:11 CEST; 7min ago
  Process: 1190 ExecStart=/usr/sbin/ntpdate -v $NTPSERVERS (code=exited, status=0/SUCCESS)
 Main PID: 1190 (code=exited, status=0/SUCCESS)

oct. 15 17:02:02 scribe systemd[1]: Starting Force synchronisation of time...
oct. 15 17:02:02 scribe ntpdate[1190]: 15 Oct 17:02:02 ntpdate[1190]: ntpdate 4.2.8p10@1.3728-o (1)
oct. 15 17:02:11 scribe ntpdate[1190]: 15 Oct 17:02:11 ntpdate[1190]: step time server 192.168.232.2 offset -2.087238 sec
oct. 15 17:02:11 scribe systemd[1]: Started Force synchronisation of time.

Le démarrage doit se faire après que netplan-wait-online.service soit terminé, c’est à dire après network-online.target

Voir l’image boot.svg dans le scénario #25457.

#4 Updated by Scrum Master almost 5 years ago

  • Status changed from En cours to Résolu

#5 Updated by Laurent Flori almost 5 years ago

  • Status changed from Résolu to Fermé
  • Remaining (hours) changed from 0.25 to 0.0

Also available in: Atom PDF