Page MenuHomeDevCentral

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

Authored by yousra on Thu, Apr 2, 12:50.
Tags
None
Referenced Files
F25322570: D4036.diff
Thu, Apr 9, 15:24
F25322393: D4036.diff
Thu, Apr 9, 15:18
F25316633: D4036.id10550.diff
Thu, Apr 9, 12:20
Unknown Object (File)
Wed, Apr 8, 16:07
Unknown Object (File)
Wed, Apr 8, 09:30
Unknown Object (File)
Wed, Apr 8, 08:20
Unknown Object (File)
Tue, Apr 7, 16:52
Unknown Object (File)
Tue, Apr 7, 12:06

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
arcpatch-D4036
Build Status
Buildable 6578
Build 6862: 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.

  • '0XXX" into XXX : correct permissions for Salt

I reordered the arguments, placing mode after makedirs