glusterfs/0414-logrotate-utilize-the-new-maxsize-option.patch
Milind Changire b7dd6f45c1 autobuild v3.12.2-26
Resolves: bz#1479446 bz#1520882 bz#1579758 bz#1598407 bz#1599808
Resolves: bz#1603118 bz#1619357 bz#1622001 bz#1622308 bz#1631166
Resolves: bz#1631418 bz#1632563 bz#1634649 bz#1635071 bz#1635100
Resolves: bz#1635136 bz#1636291 bz#1638069 bz#1640347 bz#1642854
Resolves: bz#1643035 bz#1644120 bz#1644279 bz#1645916 bz#1647675
Signed-off-by: Milind Changire <mchangir@redhat.com>
2018-11-08 22:30:35 -05:00

122 lines
2.9 KiB
Diff

From 405a367205c72318fc48d014a201eab3b7031010 Mon Sep 17 00:00:00 2001
From: Amar Tumballi <amarts@redhat.com>
Date: Mon, 5 Nov 2018 10:27:10 +0530
Subject: [PATCH 414/444] logrotate: utilize the new 'maxsize' option
Since logrotate 3.8.x version, a new option 'maxsize' is supported,
which helps in rotating the logs before the specified time if the
size exceeds maxsize limit. This should help in reducing the
overflow of gluster logs.
Upstream:
> URL: https://review.gluster.org/21187
BUG: 1599808
Change-Id: Ic662ada8b73798146736ff81963053d8981745b8
Signed-off-by: Amar Tumballi <amarts@redhat.com>
Reviewed-on: https://code.engineering.redhat.com/gerrit/154846
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
Tested-by: RHGS Build Bot <nigelb@redhat.com>
---
.testignore | 2 ++
extras/glusterfs-georep-logrotate | 24 +++++++++++++++++++++---
extras/glusterfs-logrotate | 14 ++++++++++++--
3 files changed, 35 insertions(+), 5 deletions(-)
diff --git a/.testignore b/.testignore
index 4a72bc4..6e5df3a 100644
--- a/.testignore
+++ b/.testignore
@@ -32,6 +32,8 @@ extras/cliutils/README.md
extras/command-completion/README
extras/create_new_xlator/README.md
extras/glusterfs.vim
+extras/glusterfs-logrotate
+extras/glusterfs-georep-logrotate
extras/group-gluster-block
extras/group-db-workload
extras/group-metadata-cache
diff --git a/extras/glusterfs-georep-logrotate b/extras/glusterfs-georep-logrotate
index 6fdb8c6..3e7ecf3 100644
--- a/extras/glusterfs-georep-logrotate
+++ b/extras/glusterfs-georep-logrotate
@@ -1,6 +1,12 @@
/var/log/glusterfs/geo-replication/*/*.log {
sharedscripts
- rotate 52
+ weekly
+ maxsize 10M
+ minsize 100k
+
+ # 6 months of logs are good enough
+ rotate 26
+
missingok
compress
delaycompress
@@ -15,7 +21,13 @@
/var/log/glusterfs/geo-replication-slaves/*.log {
sharedscripts
- rotate 52
+ weekly
+ maxsize 10M
+ minsize 100k
+
+ # 6 months of logs are good enough
+ rotate 26
+
missingok
compress
delaycompress
@@ -30,7 +42,13 @@
/var/log/glusterfs/geo-replication-slaves/*/*.log {
sharedscripts
- rotate 52
+ weekly
+ maxsize 10M
+ minsize 100k
+
+ # 6 months of logs are good enough
+ rotate 26
+
missingok
compress
delaycompress
diff --git a/extras/glusterfs-logrotate b/extras/glusterfs-logrotate
index 575c0ee..75f700e 100644
--- a/extras/glusterfs-logrotate
+++ b/extras/glusterfs-logrotate
@@ -2,7 +2,12 @@
/var/log/glusterfs/*.log {
sharedscripts
weekly
- rotate 52
+ maxsize 10M
+ minsize 100k
+
+# 6 months of logs are good enough
+ rotate 26
+
missingok
compress
delaycompress
@@ -17,7 +22,12 @@
/var/log/glusterfs/bricks/*.log {
sharedscripts
weekly
- rotate 52
+ maxsize 10M
+ minsize 100k
+
+# 6 months of logs are good enough
+ rotate 26
+
missingok
compress
delaycompress
--
1.8.3.1