Skip to content

Commit

Permalink
CA-389496: Avoid conflicts when rotating xapi logs
Browse files Browse the repository at this point in the history
The custom logrotation 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.

Signed-off-by: Pau Ruiz Safont <[email protected]>
  • Loading branch information
psafont committed Mar 11, 2024
1 parent 4e0d37c commit 5a7fe74
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 36 deletions.
4 changes: 1 addition & 3 deletions scripts/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,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)$(ETCXENDIR)
$(IPROG) xapi-logrotate.sh $(DESTDIR)$(LIBEXECDIR)
$(IDATA) xapi-logrotate.conf $(DESTDIR)/etc/logrotate.d/xapi
$(IPROG) xapi-tracing-log-trim.sh $(DESTDIR)$(LIBEXECDIR)
$(IPROG) xapi-wait-init-complete $(DESTDIR)$(OPTDIR)/bin
$(IPROG) xapi-autostart-vms $(DESTDIR)$(OPTDIR)/bin
Expand Down Expand Up @@ -158,7 +157,6 @@ install:
$(IPROG) certificate-check $(DESTDIR)/etc/cron.daily/
$(IPROG) certificate-refresh $(DESTDIR)/etc/cron.hourly/
mkdir -p $(DESTDIR)/etc/cron.d
$(IDATA) xapi-logrotate.cron $(DESTDIR)/etc/cron.d/xapi-logrotate.cron
$(IDATA) xapi-tracing-log-trim.cron $(DESTDIR)/etc/cron.d/xapi-tracing-log-trim.cron
mkdir -p $(DESTDIR)/opt/xensource/gpg
# templates
Expand Down
17 changes: 0 additions & 17 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 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 5a7fe74

Please sign in to comment.