Page MenuHomeDevCentral

Configure a dedicated syslog file for carp-ovh logs
Needs ReviewPublic

Authored by yousra on Thu, Apr 2, 12:50.

Details

Summary

This change adds:

  • a dedicated log file at /var/log/carp.log
  • a syslog configuration file in /usr/local/etc/syslog.d/carp.conf to redirect carp-ovh logs to /var/log/carp.log
  • a newsyslog configuration file in /etc/newsyslog.conf.d/carp.conf to rotate and compress carp log files

Ref T2292

Test Plan
  • salt 'router-003' state.apply roles/router
  • salt 'router-002' state.apply roles/router
  • Restart syslogd
  • Simulate failover
  • Verify the logs for carp-ovh is written to /var/log/carp.log with tail -f /var/log/carp.log

Diff Detail

Repository
rOPS Nasqueron Operations
Lint
Lint Skipped
Unit
No Test Coverage
Branch
log-file-carp
Build Status
Buildable 6555
Build 6839: arc lint + arc unit

Event Timeline

yousra requested review of this revision.Thu, Apr 2, 12:50
yousra created this revision.

carp-ovh logs were written both to /var/log/messages and /var/log/carp.log.
This change redirects them only to /var/log/carp.log by excluding them from /var/log/messages.

The "~" discard rule was not suitable because /etc/syslog.conf is processed before /usr/local/etc/syslog.d/carp.conf.
So logs are already written to /var/log/messages at that stage.