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