Project

General

Profile

Tâche #20494

Scénario #21122: Tester e2guardian V4

problème de déconnnexions à 9h10 sur certains amon

Added by Christophe Dezé over 6 years ago. Updated about 6 years ago.

Status:
Fermé
Priority:
Normal
Start date:
05/11/2017
Due date:
% Done:

100%

Estimated time:
3.00 h
Spent time:
Remaining (hours):
0.0

Description

des tunnels tombaient chez nous vers 9 heures, ....
j'ai fini par trouvé que cette heure correspondait à 6h25 + les 3 heures correspondant à la durée d'une SA IKE ,

donc tous les amons killent leur tunnels à 6:25 (logrotate 6h25) et redemandent tous une reauthentification à 9 heures et quelques minutes ,
et là sphynx n'arrivait pas à servir tous le monde !
donc des coupures de tunnels dans certains etablissements
cf pj
Il y a moyen d’éviter d’arrêter bastion pour le logrotate de E2g, à 6h25 avec la directive copytruncate

Barbechat.in.ac-nantes.fr-Nombre_Tunnels (13).png View (20.6 KB) Christophe Dezé, 05/11/2017 03:03 PM

guardian.logrotate.patch View - Patch pour EOLE 2.5.1 (730 Bytes) Fabrice Barconnière, 09/07/2017 09:12 AM

guardian.logrotate.patch View - Patch pour EOLE 2.5.2 (815 Bytes) Fabrice Barconnière, 09/07/2017 09:13 AM

guardian.logrotate.patch View - Patch pour EOLE 2.6.1 (824 Bytes) Fabrice Barconnière, 09/07/2017 09:13 AM


Related issues

Related to Distribution EOLE - Scénario #21244: Ne pas redémarrer rsyslogd mais utiliser l'option "rotate" Terminé (Sprint) 10/02/2017 10/20/2017

Associated revisions

Revision 7936ac57 (diff)
Added by Emmanuel GARETTE about 6 years ago

Gestion correct du logrotate (ref #20494)

Les fichiers de logs sont gérés par rsyslog, le fichier /etc/logrotate.d/e2guardian du paquet n'est pas correct.
Il n'est pas utile de redémarré le firewall avec copytruncate
L'option force-reload arrête et démarre rsyslog, l'option "rotate" est plus légère.

History

#1 Updated by Christophe Dezé over 6 years ago

https://wiki.strongswan.org/projects/strongswan/wiki/ExpiryRekey
il y aurait aussi moyen de jouer sur les paramètres margintime ou rekeyfuzz

#2 Updated by Christophe Dezé over 6 years ago

Je n'ai pas perdu de ligne avec ce logrotate

missingok

/var/log/rsyslog/local/e2guardian/*.log {
  rotate 365
  daily
  compress
  delaycompress
  sharedscripts
  ifempty
  size 0
  copytruncate
#  prerotate
#    CreoleService bastion stop >/dev/null
#  endscript

#  postrotate
#    reload rsyslog > /dev/null
#    CreoleRun "service bastion restart" root no yes  >/dev/null
#    CreoleRun "service bastion restart" all no yes  >/dev/null
#  endscript
}

j'ai refait ton test avec un for i in {1..500}; do wget www.toto.fr/"$i"; done en boucle et copytruncate (j'ai pas perdu de ligne )

#3 Updated by Christophe Dezé over 6 years ago

j'ai supprimé les post et prerotate sur 30 2.4 et 10 2.5, et remplacé par copytruncate,

#4 Updated by Joël Cuissinat about 6 years ago

  • Tracker changed from Demande to Tâche
  • Project changed from Sphynx to eole-proxy
  • Estimated time set to 3.00 h
  • Parent task set to #21122
  • Remaining (hours) set to 3.0

#5 Updated by Emmanuel GARETTE about 6 years ago

  • Status changed from Nouveau to En cours
  • Assigned To set to Emmanuel GARETTE

#6 Updated by Joël Cuissinat about 6 years ago

Pour compléter cette demande :
  • il existe existait :( déjà une proposition de scénario plus générale sur les logrotate : #8540
  • quel est l'intérêt de redémarrer "bastion" ? eole-proxy:5d403507 => signalement introuvable
  • fichier proposé dans le paquet e2guardian 4.1.2
    root@amon:~# cat /etc/logrotate.d/e2guardian 
    /var/log/e2guardian/*.log {
        rotate 5
        daily
        prerotate
            /etc/init.d/e2guardian stop > /dev/null 2>&1 || true
        endscript
        postrotate
            /etc/init.d/e2guardian start > /dev/null 2>&1
        endscript
    }
    

#7 Updated by Emmanuel GARETTE about 6 years ago

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

#8 Updated by Fabrice Barconnière about 6 years ago

  • Project changed from eole-proxy to Distribution EOLE
  • Remaining (hours) changed from 0.25 to 3.0

#9 Updated by Fabrice Barconnière about 6 years ago

ERRATA

Pour appliquer cette modification sur les versions EOLE inférieures à 2.6.2, il faut applique ce patch :

guardian.logrotate.patch pour EOLE 2.5.1
guardian.logrotate.patch pour EOLE 2.5.2
guardian.logrotate.patch pour EOLE 2.6.1

#10 Updated by Emmanuel GARETTE about 6 years ago

  • Assigned To changed from Emmanuel GARETTE to Fabrice Barconnière

#11 Updated by Fabrice Barconnière about 6 years ago

  • Subject changed from problème de deconnnections à 9h10 sur certains amon to problème de déconnnexions à 9h10 sur certains amon

#12 Updated by Fabrice Barconnière about 6 years ago

  • Status changed from En cours to Résolu
  • Remaining (hours) changed from 3.0 to 0.5

OK, le logrotate de e2guardian ne coupe plus bastion et les VPN.
Les patch pour EOLE 2.5.1, 2.5.2 et 2.6.1 sont proposés en ERRATA.

#13 Updated by Daniel Dehennin about 6 years ago

  • Project changed from eole-proxy to Distribution EOLE
  • Status changed from Résolu to Fermé
  • Remaining (hours) changed from 0.5 to 0.0

#14 Updated by Scrum Master about 6 years ago

  • Related to Scénario #21244: Ne pas redémarrer rsyslogd mais utiliser l'option "rotate" added

Also available in: Atom PDF