From: Balazs Szekeres Date: Mon, 30 Sep 2019 11:22:42 +0000 (+0200) Subject: Java heap dump rotation X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=commitdiff_plain;h=675ef7449974276d4ca86a63b900b6f599bb237b;p=ta%2Fcaas-install.git Java heap dump rotation Added Java heap dump rotation Elasticsearch heap dumps are thrown away Change-Id: I2b00596afce69c8cd8cfe11c96d82707e29e89db Signed-off-by: Balazs Szekeres --- diff --git a/SPECS/infra-charts.spec b/SPECS/infra-charts.spec index 11455d6..05a24ef 100644 --- a/SPECS/infra-charts.spec +++ b/SPECS/infra-charts.spec @@ -15,7 +15,7 @@ %define COMPONENT infra-charts %define RPM_NAME caas-%{COMPONENT} %define RPM_MAJOR_VERSION 1.0.0 -%define RPM_MINOR_VERSION 40 +%define RPM_MINOR_VERSION 41 Name: %{RPM_NAME} Version: %{RPM_MAJOR_VERSION} diff --git a/ansible/roles/log/tasks/main.yml b/ansible/roles/log/tasks/main.yml index cb3d84f..7f8f6a2 100644 --- a/ansible/roles/log/tasks/main.yml +++ b/ansible/roles/log/tasks/main.yml @@ -35,6 +35,14 @@ become: true become_user: "root" +- name: template java-hprof to logrotate directory + template: + src: java-hprof + dest: /etc/logrotate.d/java-hprof + mode: 0640 + become: true + become_user: "root" + - name: Ansible insert a line before example blockinfile: dest: /etc/logrotate.d/syslog diff --git a/ansible/roles/log/templates/java-hprof b/ansible/roles/log/templates/java-hprof new file mode 100644 index 0000000..a21cee0 --- /dev/null +++ b/ansible/roles/log/templates/java-hprof @@ -0,0 +1,6 @@ +"{{ caas.kubelet_root_directory }}"/*.hprof "{{ caas.kubelet_root_directory }}"/*/*hprof "{{ caas.kubelet_root_directory }}"/*/*/*hprof "{{ caas.kubelet_root_directory }}"/*/*/*/*hprof "{{ caas.kubelet_root_directory }}"/*/*/*/*/*hprof { + maxage 30 + maxsize 5G + missingok + } + diff --git a/infra-charts/templates/elasticsearch-statefulset.yaml b/infra-charts/templates/elasticsearch-statefulset.yaml index 608557b..fd628b7 100644 --- a/infra-charts/templates/elasticsearch-statefulset.yaml +++ b/infra-charts/templates/elasticsearch-statefulset.yaml @@ -62,7 +62,7 @@ spec: - name: NODE_DATA value: "true" - name: ES_JAVA_OPTS - value: "-Xms{{ .Values.elasticsearch.java_heap_request }} -Xmx{{ .Values.elasticsearch.java_heap_max }} -Dmapper.allow_dots_in_name=true" + value: "-Xms{{ .Values.elasticsearch.java_heap_request }} -Xmx{{ .Values.elasticsearch.java_heap_max }} -Dmapper.allow_dots_in_name=true -XX:HeapDumpPath=/dev/null" {{- range $key, $value := .Values.elasticsearch.env }} - name: {{ $key }} value: {{ $value | quote }}