[node-patches] Change in ovirt-node[master]: logrotate: set state in /var/lib/logrotate
dougsland at redhat.com
dougsland at redhat.com
Thu Oct 20 05:15:17 UTC 2016
Douglas Schilling Landgraf has uploaded a new change for review.
Change subject: logrotate: set state in /var/lib/logrotate
......................................................................
logrotate: set state in /var/lib/logrotate
This is a temp. workaround for logrotate not
having it's own directory inside /var/lib to handle
files and set it into rwtab. Without the workaround
vdsm logs are not rotated.
Change-Id: I1179712e43696dc27a5a71cab2ad24b81079d187
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1380596
Signed-off-by: Douglas Schilling Landgraf <dougsland at redhat.com>
---
M logrotate/ovirt-logrotate
M recipe/common-post.ks
2 files changed, 6 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/17/65617/1
diff --git a/logrotate/ovirt-logrotate b/logrotate/ovirt-logrotate
index ddb94ad..8b35f38 100644
--- a/logrotate/ovirt-logrotate
+++ b/logrotate/ovirt-logrotate
@@ -1,2 +1,2 @@
# Run each log rotation every 10 minutes
-*/10 * * * * root /usr/sbin/logrotate /etc/logrotate.conf
+*/10 * * * * root /usr/sbin/logrotate -s /var/lib/logrotate/logrotate.status /etc/logrotate.conf
diff --git a/recipe/common-post.ks b/recipe/common-post.ks
index 37c18f8..edfb76e 100644
--- a/recipe/common-post.ks
+++ b/recipe/common-post.ks
@@ -100,6 +100,7 @@
files /var/lib/net-snmp
dirs /var/lib/dnsmasq
dirs /var/lib/rsyslog
+dirs /var/lib/logrotate
files /root/.ssh
dirs /root/.uml
files /var/cache/libvirt
@@ -302,3 +303,7 @@
ConditionPathExists=|/var/lib/rhsm/productid.js
ConditionPathExists=|/etc/sysconfig/rhn/systemid
EOC
+
+# Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1381719
+mkdir -p /var/lib/logrotate
+sed -i 's#/usr/sbin/logrotate /etc/vdsm/logrotate/vdsm#/usr/sbin/logrotate -s /var/lib/logrotate/logrotate.status /etc/vdsm/logrotate/vdsm#g' /etc/cron.hourly/vdsm-logrotate
--
To view, visit https://gerrit.ovirt.org/65617
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1179712e43696dc27a5a71cab2ad24b81079d187
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Douglas Schilling Landgraf <dougsland at redhat.com>
More information about the node-patches
mailing list