mirror of
https://bitbucket.org/atlassian/dc-deployments-automation.git
synced 2025-12-13 16:33:08 -06:00
ITPLAT-399 Systemd cleans up files in /tmp older than 10 days. This removes the /tmp/.java_pid* file which is the socket created by the JVM that facilitates thread dumps. This file is never recreated once it's deleted, and the only way to recreate it and restore thread dump functionality is to restart the JVM. If using OpenJDK there is no -F option to force thread dumps which bypasses the socket. Once the file is deleted there is no way to take a thread dump on OpenJDK until a restart is performed. This commit excludes required java hooks including the pid file from systemd's cleanup. For more info: https://bugzilla.redhat.com/show_bug.cgi?id=1704608
This commit is contained in:
3
roles/linux_common/files/java.conf
Normal file
3
roles/linux_common/files/java.conf
Normal file
@@ -0,0 +1,3 @@
|
||||
# Exclude java-hooks
|
||||
x /tmp/hsperfdata_*
|
||||
x /tmp/.java_pid*
|
||||
@@ -26,3 +26,19 @@
|
||||
uid: "{{ atl_product_user_uid }}"
|
||||
group: "{{ atl_product_user }}"
|
||||
comment: "Product runtime user"
|
||||
|
||||
- name: Stop systemd-cleanup deleting the jvm socket file
|
||||
copy:
|
||||
src: java.conf
|
||||
dest: "/usr/lib/tmpfiles.d/java.conf"
|
||||
owner: root
|
||||
group: root
|
||||
mode: "644"
|
||||
register: systemd_config_changed
|
||||
|
||||
- name: Force systemd to reload daemon configuration
|
||||
systemd:
|
||||
daemon_reload: yes
|
||||
when:
|
||||
- systemd_config_changed is defined
|
||||
- molecule_yml is not defined # molecule cannot run systemctl commands and notest doesn't work for handlers
|
||||
|
||||
Reference in New Issue
Block a user