medic / medic-os

A space-efficient Linux-based operating system, designed specifically to run Medic's mHealth platform. This is the build system and source code; Docker images will be available on Medic's website.
https://medic.org
GNU Affero General Public License v3.0
10 stars 6 forks source link

Audit Logs are not being rotated #50

Closed Hareet closed 4 years ago

Hareet commented 4 years ago

In relation to this issue: https://github.com/medic/medic-projects/issues/7075

Audit (Haproxy) logs are not being rotated due to a parameters conflicting with an older logrotate config.

Haproxy logrotate config conflicts with an older logrotate config that cron uses:

# /etc/logrotate.conf
#   This file is symlinked in to /etc at boot, by a setup script
#   in the `medic-core` package. Please do not edit this file
#   directly; use one of the logrotate.d directories instead.

daily
compress
rotate 21
copytruncate
compressext .bz2
compressoptions -9
compresscmd /usr/bin/bzip2
uncompresscmd /usr/bin/bunzip2

include /etc/logrotate.d

Resolution: Rebuild system_services.conf to not contain any parameters for haproxy log. Manual kick-off logrotate worked once conf was hot-fixed.

Hareet commented 4 years ago

This was fixed over winter break for all 3.x projects.