Projet

Général

Profil

Tâche #34002

Scénario #33848: Pb logrotate winbindd

Tester

Ajouté par Benjamin Bohard il y a environ 2 ans. Mis à jour il y a environ 2 ans.

Statut:
Fermé
Priorité:
Normal
Assigné à:
Début:
28/03/2022
Echéance:
% réalisé:

100%

Restant à faire (heures):
0.0

Historique

#1 Mis à jour par Benjamin Bohard il y a environ 2 ans

Le changement à tester est le fonctionnement du nouveau script /usr/sbin/eole-purge-logs :
  • il doit être installé
  • son exécution ne doit pas provoquer d’erreurs
  • il doit être exécuté au reconfigure

Pour que le script ait des choses à faire, il faut des fichiers de log non compressés avec de multiples timestamps à la fin du nom.
Ces fichiers doivent se trouver sous /var/log.

Il y a plusieurs sous-cas pris en compte :
  • le fichier est vide
  • le fichier n’est pas vide :
    • l’un des timestamp composant le nom peut-être utilisé pour renommer le fichier
    • aucun des timestamp composent le nom ne peut-être utilisé pour renommer le fichier

Par exemple :

/var/log/samba/log.winbindd                              # log en cours d’écriture
/var/log/samba/log.winbindd-20220401.gz
/var/log/samba/log.winbindd-20220402.gz
/var/log/samba/log.winbindd-20220404                     # précédent log écrit, compression différée à la prochaine rotation
/var/log/samba/log.winbindd-20220401-20220402            # fichier vide avec nom défectueux, à supprimer
/var/log/samba/log.winbindd-20220401-20220402-20220404   # fichier non vide ne pouvant pas être renommé (des fichiers existent déjà avec les noms potentiels)
/var/log/samba/log.winbindd-20220401-20220402-20220403   # fichier non vide pouvant être renommé en log.winbindd-20220403

#2 Mis à jour par Ludwig Seys il y a environ 2 ans

  • Statut changé de Nouveau à En cours
  • Assigné à mis à Ludwig Seys

#3 Mis à jour par Ludwig Seys il y a environ 2 ans

  • Statut changé de En cours à Résolu
  • % réalisé changé de 0 à 100

test concluant
nb : ne pas oublier de remplir les fichier de logs pour le test, et surtout qu'il y en a un qui doit rester vide.

#4 Mis à jour par Joël Cuissinat il y a environ 2 ans

root@eolebase:~# ll /var/log/samba/
total 32
drwxr-xr-x  2 root root   4096 avril 11 14:46 ./
drwxrwxr-x 19 root syslog 4096 avril 11 14:45 ../
-rw-r--r--  1 root root      5 avril 11 14:45 log.winbindd
-rw-r--r--  1 root root      0 avril 11 14:46 log.winbindd-20220401-20220402
-rw-r--r--  1 root root      3 avril 11 14:46 log.winbindd-20220401-20220402-20220403
-rw-r--r--  1 root root      3 avril 11 14:46 log.winbindd-20220401-20220402-20220404
-rw-r--r--  1 root root     75 avril 11 14:47 log.winbindd-20220401.gz
-rw-r--r--  1 root root     89 avril 11 14:47 log.winbindd-20220402.gz
-rw-r--r--  1 root root      5 avril 11 14:46 log.winbindd-20220404
run-parts: executing /usr/share/eole/posttemplate/00-eole-common reconfigure
Purge log files with non-conventional names
Erased files:
     /var/log/samba/log.winbindd-20220401-20220402
Renamed files:
     /var/log/samba/log.winbindd-20220401-20220402-20220403 to /var/log/samba/log.winbindd-20220403
Untouched files:
     /var/log/samba/log.winbindd-20220401-20220402-20220404
root@eolebase:~# ll /var/log/samba/
total 32
drwxr-xr-x  2 root root   4096 avril 11 14:48 ./
drwxrwxr-x 19 root syslog 4096 avril 11 14:45 ../
-rw-r--r--  1 root root      5 avril 11 14:45 log.winbindd
-rw-r--r--  1 root root      3 avril 11 14:46 log.winbindd-20220401-20220402-20220404
-rw-r--r--  1 root root     75 avril 11 14:47 log.winbindd-20220401.gz
-rw-r--r--  1 root root     89 avril 11 14:47 log.winbindd-20220402.gz
-rw-r--r--  1 root root      3 avril 11 14:46 log.winbindd-20220403
-rw-r--r--  1 root root      5 avril 11 14:46 log.winbindd-20220404

#5 Mis à jour par Joël Cuissinat il y a environ 2 ans

  • Statut changé de Résolu à Fermé
  • Restant à faire (heures) mis à 0.0

Formats disponibles : Atom PDF