logrotate su fail2ban, durante il boot, può rallentare l'avvio di 30-40 secondi

Davide Prina <[email protected]>
Newsgroups gmane.linux.debian.user.italian
Message-ID <trinity-5d9d7db8-82dc-4830-857c-e7db85c960cf-1786870044424@trinity-msg-rest-gmx-mailcom-live-bd65d5bd8-6dmzg>
ho scoperto che può accadere che logrotate attenda il timeout o

l'eventuale avvio di file2ban per poter fare la rotazione dei log di

file2ban, questo perché file2ban può partire successivamente a

logrotate. Questo può capire se si ha hardware un po' datato/lento

o su vm

si può vedere da questo bug report: #935778

si può usare il comando:

$ querybts 935778

La segnalazione di questo problema è di 9 anni fa e non è ancora stata

implementata una soluzione, quindi non penso lo sarà a breve.

La soluzione che ho scelto io è quella di modificare il file:

/etc/logrotate.d/fail2ban

modificando la riga:

fail2ban-client flushlogs 1>/dev/null

con:

fail2ban-client flushlogs 1>/dev/null || true

questo fa si che il log di file2ban possa non essere sempre ruotato

durante l'avvio, ma prima o poi lo sarà.

Ciao

Davide

--
La mia privacy non è affar tuo
https://noyb.eu/it
- You do not have my permission to use this email to train an AI -
If you use this to train your AI than you accept to distribute under AGPL
license >= 3.0 all the model trained, all the source you have used to
training your model and all the source of the program that use that model
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.