Page MenuHomeDevCentral

Configure a dedicated syslog file for carp-ovh logs
ClosedPublic

Authored by yousra on Apr 2 2026, 12:50.
Tags
None
Referenced Files
F31592286: D4036.id10692.diff
Wed, Jun 3, 06:31
F31590272: D4036.id10670.diff
Wed, Jun 3, 06:09
F31586948: D4036.id10571.diff
Wed, Jun 3, 05:37
F31576413: D4036.id10550.diff
Wed, Jun 3, 03:50
F31564828: D4036.id10547.diff
Wed, Jun 3, 00:25
F31561009: D4036.id.diff
Tue, Jun 2, 23:09
F31560499: D4036.id10546.diff
Tue, Jun 2, 22:58
Unknown Object (File)
Mon, Jun 1, 10:30

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 6554
Build 6838: arc lint + arc unit

Event Timeline

yousra requested review of this revision.Apr 2 2026, 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

roles/router/carp/init.sls
44

Actually, newsyslog will create that file with the C flag you put in /var/log/carp.log root:wheel 644 7 1000 * JC, so we can remove this block.

Removed /var/log/carp.log state because it is created automatically by newsyslog.

This revision is now accepted and ready to land.Apr 19 2026, 16:59