Scénario #30993
Logrotate en erreur après instance (2.8.0-beta1)
100%
Description
Pas №6¶
root@eolebase:~# diagnose *** Test du module eolebase version 2.8.0 (eolebase 0000000A) *** Attention, serveur opérationnel mais des services ne sont pas démarrés : logrotate.service loaded failed *** Paquets installés
root@eolebase:~# systemctl status logrotate ● logrotate.service - Rotate log files Loaded: loaded (/lib/systemd/system/logrotate.service; static; vendor preset: enabled) Active: failed (Result: exit-code) since Wed 2020-11-04 09:23:57 CET; 10min ago TriggeredBy: ● logrotate.timer Docs: man:logrotate(8) man:logrotate.conf(5) Main PID: 1013 (code=exited, status=1/FAILURE) nov. 04 09:23:57 eolebase systemd[1]: Starting Rotate log files... nov. 04 09:23:57 eolebase logrotate[1013]: error: stat of /var/log/schedule.log failed: Aucun fichier ou dossier de ce type nov. 04 09:23:57 eolebase systemd[1]: logrotate.service: Main process exited, code=exited, status=1/FAILURE nov. 04 09:23:57 eolebase systemd[1]: logrotate.service: Failed with result 'exit-code'. nov. 04 09:23:57 eolebase systemd[1]: Failed to start Rotate log files.
Le service logrotate est OK après un restart ;)
Exécution Squash-TM¶
- https://dev-eole.ac-dijon.fr/squash/executions/10929
- https://dev-eole.ac-dijon.fr/squash/executions/11077 (même problème sur sphynx)
- https://dev-eole.ac-dijon.fr/squash/executions/11198 (idem sur dc2 pas 10)
Subtasks
Related issues
History
#1 Updated by Bruno Boiget almost 3 years ago
- Description updated (diff)
#2 Updated by Fabrice Barconnière almost 3 years ago
- Description updated (diff)
#3 Updated by Joël Cuissinat almost 3 years ago
- Parent task deleted (
#30862)
#4 Updated by Joël Cuissinat almost 3 years ago
- Tracker changed from Tâche to Scénario
- Subject changed from Correction SC-T01-003 - Lancer reconfigure sur un serveur fraîchement installé (non configuré) (2.8.0-beta1) to Logrotate en erreur après instance (2.8.0-beta1)
- Due date set to 11/06/2020
#5 Updated by Gilles Grandgérard almost 3 years ago
- Target version changed from sprint 2020 43-45 Equipe MENSR to sprint 2020 46-48 Equipe MENSR
#6 Updated by Laurent Flori almost 3 years ago
Le démon logrotate ne démarre pas parce qu'il manque le fichier /var/log/schedule.log
Ce fichier est référencé par /etc/logrotate.d/schedule (du paquet creole)
Pour reproduire:
Sur une machine eolebase 2.8.0 non instanciée
root@eolebase:~# systemctl status logrotate.service ● logrotate.service - Rotate log files Loaded: loaded (/lib/systemd/system/logrotate.service; static; vendor preset: enabled) Active: failed (Result: exit-code) since Tue 2020-11-10 10:53:45 CET; 2s ago TriggeredBy: ● logrotate.timer Docs: man:logrotate(8) man:logrotate.conf(5) Process: 1066 ExecStart=/usr/sbin/logrotate /etc/logrotate.conf (code=exited, status=1/FAILURE) Main PID: 1066 (code=exited, status=1/FAILURE) nov. 10 10:53:45 eolebase systemd[1]: Starting Rotate log files... nov. 10 10:53:45 eolebase logrotate[1066]: error: stat of /var/log/schedule.log failed: Aucun fichier ou dossier de ce type nov. 10 10:53:45 eolebase systemd[1]: logrotate.service: Main process exited, code=exited, status=1/FAILURE nov. 10 10:53:45 eolebase systemd[1]: logrotate.service: Failed with result 'exit-code'. nov. 10 10:53:45 eolebase systemd[1]: Failed to start Rotate log files. root@eolebase:~# systemctl restart logrotate.service Job for logrotate.service failed because the control process exited with error code. See "systemctl status logrotate.service" and "journalctl -xe" for details. root@eolebase:~# touch /var/log/schedule.log root@eolebase:~# systemctl restart logrotate.service root@eolebase:~#
#7 Updated by Fabrice Barconnière almost 3 years ago
Déjà signalé il y a plusieurs mois mais sans pouvoir reproduire : https://dev-eole.ac-dijon.fr/issues/29922
#8 Updated by Fabrice Barconnière almost 3 years ago
Une fois le fichier /etc/logrotate.d/00-eole-options
(template logrotate_global_options
) instancié, le service logrotate fonctionne même si un fichier de log référencé est manquant.
Il faut soit prévoir un redémarrage du service en posttemplate ou faire gérer le service par creole dans le dictionnaire 00_common.xml
qui gère le template précédemment cité.
Je pencherai pour la gestion par creole car il y a la génération de règles dans /etc/logrotate.d/
en posttemplate.
#9 Updated by Joël Cuissinat almost 3 years ago
- Related to Tâche #29922: Le service logrotate ne se lance pas sur Sphynx 2.8.0 added
#10 Updated by Laurent Flori almost 3 years ago
- Related to Scénario #31171: Etudier l'impact de l'utilisation de logrotate.timer à la place de logrotate.service (2.8.1) added
#11 Updated by Fabrice Barconnière almost 3 years ago
- Status changed from Nouveau to Terminé (Sprint)
#12 Updated by Emmanuel GARETTE almost 3 years ago
- Related to Tâche #31395: Etude added
#13 Updated by Joël Cuissinat almost 3 years ago
- Release set to EOLE 2.8.0
- Story points set to 1.0