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