Project

General

Profile

Tâche #34153

Scénario #34096: EOLE 2.9 : warning logrotate sur Amon

Étude

Added by Benjamin Bohard 7 months ago. Updated 6 months ago.

Status:
Fermé
Priority:
Normal
Assigned To:
Start date:
05/09/2022
Due date:
% Done:

100%

Remaining (hours):
0.0

Related issues

Related to Distribution EOLE - Tâche #13349: fichier de log pas forcement "rotate" Fermé 10/02/2015

Associated revisions

Revision c3158a53 (diff)
Added by Benjamin Bohard 7 months ago

Supprimer l’option size en conflit avec l’option daily.

Ref #34153

History

#1 Updated by Benjamin Bohard 7 months ago

  • Status changed from Nouveau to En cours

#2 Updated by Benjamin Bohard 7 months ago

Les deux options incompatibles (size et daily) cohabitent néanmoins depuis 2015.
A priori, l’option ifempty devrait suffire à s’assurer que la rotation est effectuée tous les jours (et nécessaire parce que ifnotempty est déclarée globalement).

#3 Updated by Benjamin Bohard 7 months ago

Avec les deux options :

rotating pattern: /var/log/rsyslog/local/e2guardian/*.log  forced from command line (365 rotations)
empty log files are rotated, old logs are removed
switching euid from 0 to 0 and egid from 0 to 4 (pid 5191)
considering log /var/log/rsyslog/local/e2guardian/e2guardian0.info.log
  Now: 2022-05-11 14:33
  Last rotated at 2022-05-11 14:32
  log needs rotating
considering log /var/log/rsyslog/local/e2guardian/e2guardian2.err.log
  Now: 2022-05-11 14:33
  Last rotated at 2022-05-11 14:32
  log needs rotating
considering log /var/log/rsyslog/local/e2guardian/e2guardian2.info.log
  Now: 2022-05-11 14:33
  Last rotated at 2022-05-11 14:32
  log needs rotating

Sans l’option size :

rotating pattern: /var/log/rsyslog/local/e2guardian/*.log  forced from command line (365 rotations)
empty log files are rotated, old logs are removed
switching euid from 0 to 0 and egid from 0 to 4 (pid 5501)
considering log /var/log/rsyslog/local/e2guardian/e2guardian0.info.log
  Now: 2022-05-11 14:37
  Last rotated at 2022-05-11 14:33
  log needs rotating
considering log /var/log/rsyslog/local/e2guardian/e2guardian2.err.log
  Now: 2022-05-11 14:37
  Last rotated at 2022-05-11 14:33
  log needs rotating
considering log /var/log/rsyslog/local/e2guardian/e2guardian2.info.log
  Now: 2022-05-11 14:37
  Last rotated at 2022-05-11 14:33
  log needs rotating

Sans l’option ifempty (et avec l’option resize 0) :

rotating pattern: /var/log/rsyslog/local/e2guardian/*.log  forced from command line (365 rotations)
empty log files are not rotated, old logs are removed
switching euid from 0 to 0 and egid from 0 to 4 (pid 5709)
considering log /var/log/rsyslog/local/e2guardian/e2guardian0.info.log
  Now: 2022-05-11 14:40
  Last rotated at 2022-05-11 14:37
  log does not need rotating (log is empty)
considering log /var/log/rsyslog/local/e2guardian/e2guardian2.err.log
  Now: 2022-05-11 14:40
  Last rotated at 2022-05-11 14:37
  log does not need rotating (log is empty)
considering log /var/log/rsyslog/local/e2guardian/e2guardian2.info.log
  Now: 2022-05-11 14:40
  Last rotated at 2022-05-11 14:37
  log does not need rotating (log is empty)
not running postrotate script, since no logs were rotated
switching euid from 0 to 0 and egid from 4 to 0 (pid 5709)

La combinaison des options ifempty (pour surcharger l’option globale notifempty) et daily semblent donc répondre à la problématique de rotation tous les jours même en cas de fichier vide.

#4 Updated by Benjamin Bohard 7 months ago

  • Related to Tâche #13349: fichier de log pas forcement "rotate" added

#5 Updated by Benjamin Bohard 7 months ago

  • Status changed from En cours to À valider

#6 Updated by Laurent Gourvenec 6 months ago

  • Status changed from À valider to Résolu

#7 Updated by Laurent Gourvenec 6 months ago

  • % Done changed from 0 to 100

#8 Updated by Joël Cuissinat 6 months ago

eole-proxy$ git branch -r --contains c3158a53  
  origin/2.8.1/master
  origin/HEAD -> origin/master
  origin/dist/eole/2.8.1/master
  origin/dist/eole/2.9.0/master
  origin/master

#9 Updated by Joël Cuissinat 6 months ago

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

Also available in: Atom PDF