Skip to content

Commit

Permalink
CA-389496: Avoid configuration conflicts for rotating xapi logs
Browse files Browse the repository at this point in the history
The custom logrotation setup for xapi sometimes conflicted with the normal one.
Remove the former.

Install the xapi logrotate configuration has been moved to be managed as part
of the normal logrotation, with the global settings removed.

Duplicate settings in the configuration have been removed.

Signed-off-by: Pau Ruiz Safont <[email protected]>

(cherry picked from commit 51521bf)
Signed-off-by: Pau Ruiz Safont <[email protected]>
  • Loading branch information
psafont authored and lindig committed Mar 13, 2024
1 parent 52abc17 commit 6a1d65e
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 40 deletions.
5 changes: 1 addition & 4 deletions scripts/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ install:
$(IPROG) xapi-health-check $(DESTDIR)$(LIBEXECDIR)
$(IPROG) mail-alarm $(DESTDIR)$(LIBEXECDIR)
$(IDATA) audit-logrotate $(DESTDIR)/etc/logrotate.d/audit
$(IDATA) xapi-logrotate.conf $(DESTDIR)$(ETCDIR)
$(IPROG) xapi-logrotate.sh $(DESTDIR)$(LIBEXECDIR)
$(IDATA) xapi-logrotate.conf $(DESTDIR)/etc/logrotate.d/xapi
$(IPROG) xapi-wait-init-complete $(DESTDIR)$(BINDIR)
$(IPROG) xapi-autostart-vms $(DESTDIR)$(BINDIR)
$(IPROG) udhcpd.skel $(DESTDIR)$(ETCDIR)/udhcpd.skel
Expand Down Expand Up @@ -140,8 +139,6 @@ install:
mkdir -p $(DESTDIR)/etc/cron.daily
$(IPROG) license-check $(DESTDIR)/etc/cron.daily/
$(IPROG) certificate-check $(DESTDIR)/etc/cron.daily/
mkdir -p $(DESTDIR)/etc/cron.d
$(IDATA) xapi-logrotate.cron $(DESTDIR)/etc/cron.d/xapi-logrotate.cron
mkdir -p $(DESTDIR)/opt/xensource/gpg
# templates
$(IPROG) templates/debian $(DESTDIR)$(OPTDIR)/packages/post-install-scripts/debian-etch
Expand Down
20 changes: 0 additions & 20 deletions scripts/xapi-logrotate.conf
Original file line number Diff line number Diff line change
@@ -1,20 +1,3 @@
# see "man logrotate" for details
# rotate log files daily
daily

# keep one months worth of backlogs
rotate 31

# create new (empty) log files after rotating old ones
create

# compress log files
compress
delaycompress

# All the general settings above are copied from /etc/logrotate.conf
# as installed by the logrotate RPM.

/var/log/xensource.log {
missingok

Expand All @@ -26,9 +9,6 @@ delaycompress
# When rotating, remove any rotated logs older than this many days.
maxage 31

# Rotate when file exceeds this size, even if we rotated it today already.
maxsize 100M

# Keep up to this many old files.
# (When considering total size, expect a compression factor around 10-20.)
rotate 100
Expand Down
3 changes: 0 additions & 3 deletions scripts/xapi-logrotate.cron

This file was deleted.

13 changes: 0 additions & 13 deletions scripts/xapi-logrotate.sh

This file was deleted.

0 comments on commit 6a1d65e

Please sign in to comment.