elasticsearch: Disable GC rotation for JDK 8

This commit is contained in:
William Hirigoyen 2023-03-09 16:33:01 +01:00
parent 058753bcfe
commit fc95f57711
2 changed files with 15 additions and 2 deletions

View File

@ -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

View File

@ -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