From fc95f57711e9d8db81a9406e994e52a66487269a Mon Sep 17 00:00:00 2001 From: William Hirigoyen Date: Thu, 9 Mar 2023 16:33:01 +0100 Subject: [PATCH] elasticsearch: Disable GC rotation for JDK 8 --- CHANGELOG.md | 1 + elasticsearch/tasks/configuration.yml | 16 ++++++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 90c2edc3..70fc3f4a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -54,6 +54,7 @@ The **patch** part changes is incremented if multiple releases happen the same m * userlogrotate: fix bug introduced in commit 2e54944a246 (rotated files were not zipped) * userlogrotate: skip zipping if .gz log already exists (prevents interactive question) * postfix: avoid Amavis transport to be considered dead when restarted. +* elasticsearch: Disable GC rotation for JDK 8 (priorly done only for >= 9) ### Removed diff --git a/elasticsearch/tasks/configuration.yml b/elasticsearch/tasks/configuration.yml index c4a5916a..77e90b09 100644 --- a/elasticsearch/tasks/configuration.yml +++ b/elasticsearch/tasks/configuration.yml @@ -118,11 +118,23 @@ tags: - config -- name: Garbage collector logs rotation by the JVM is disabled +- name: Garbage collector logs rotation by the JVM is disabled (JDK >= 9) lineinfile: dest: /etc/elasticsearch/jvm.options.d/evolinux.options regexp: "^-Xlog:gc" - line: "-Xlog:gc*,gc+age=trace,safepoint:file=/var/log/elasticsearch/gc.log:utctime,pid,tags:filecount=0" + line: "9-:-Xlog:gc*,gc+age=trace,safepoint:file=/var/log/elasticsearch/gc.log:utctime,pid,tags:filecount=0" + create: yes + owner: root + group: elasticsearch + mode: "0640" + tags: + - config + +- name: Garbage collector logs rotation by the JVM is disabled (JDK == 8) + lineinfile: + dest: /etc/elasticsearch/jvm.options.d/evolinux.options + regexp: "^-Xlog:gc" + line: "8:-XX:GCLogFileSize=0" create: yes owner: root group: elasticsearch