From 3c0912000f5d2d7a361a796e07eed7ba24c8df2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vincent=20Membr=C3=A9?= Date: Fri, 6 Dec 2024 23:35:08 +0100 Subject: [PATCH] Fixes #26040: Have a stable webapp log file - packaging part --- rudder-server/SOURCES/Makefile | 41 ++++++++++--------- .../rudder-jetty-base/etc/console-capture.xml | 2 +- rudder-server/SOURCES/rudder-jetty.conf | 2 +- rudder-server/SOURCES/rudder-jetty.default | 4 +- 4 files changed, 25 insertions(+), 24 deletions(-) diff --git a/rudder-server/SOURCES/Makefile b/rudder-server/SOURCES/Makefile index 801b07071..7b071fdd2 100644 --- a/rudder-server/SOURCES/Makefile +++ b/rudder-server/SOURCES/Makefile @@ -137,42 +137,43 @@ rudder-server-version: [ -f ../../versions ] && cat ../../versions >> $@ || true install: build rudder-server-version initial-promises initial-ncf - mkdir -p $(DESTDIR)/opt/rudder/etc/postgresql/ + mkdir -p $(DESTDIR)/opt/rudder/etc/postgresql mkdir -p $(DESTDIR)/usr/lib/systemd/system - mkdir -p $(DESTDIR)/opt/rudder/share/package-scripts/ - mkdir -p $(DESTDIR)/opt/rudder/share/versions/ + mkdir -p $(DESTDIR)/opt/rudder/share/package-scripts + mkdir -p $(DESTDIR)/opt/rudder/share/versions install -m 644 rudder-sources/rudder/webapp/sources/rudder/rudder-core/src/main/resources/reportsSchema.sql $(DESTDIR)/opt/rudder/etc/postgresql/ install -m 644 rudder-server.service $(DESTDIR)/usr/lib/systemd/system/ install -m 755 rudder-server-postinst $(DESTDIR)/opt/rudder/share/package-scripts/ install -m 644 rudder-server-version $(DESTDIR)/opt/rudder/share/versions/ - mkdir -p $(DESTDIR)/opt/rudder/etc/ + mkdir -p $(DESTDIR)/opt/rudder/etc mkdir -p $(DESTDIR)/opt/rudder/etc/plugins/licenses - mkdir -p $(DESTDIR)/opt/rudder/etc/hooks.d/ - mkdir -p $(DESTDIR)/opt/rudder/bin/ - mkdir -p $(DESTDIR)/opt/rudder/share/webapps/ - mkdir -p $(DESTDIR)/opt/rudder/share/rudder-plugins/ + mkdir -p $(DESTDIR)/opt/rudder/etc/hooks.d + mkdir -p $(DESTDIR)/opt/rudder/bin + mkdir -p $(DESTDIR)/opt/rudder/share/webapps + mkdir -p $(DESTDIR)/opt/rudder/share/rudder-plugins mkdir -p $(DESTDIR)/opt/rudder/share/tools - mkdir -p $(DESTDIR)/opt/rudder/share/plugins/ - mkdir -p $(DESTDIR)/opt/rudder/share/upgrade-tools/ - mkdir -p $(DESTDIR)/opt/rudder/share/certificates/ - mkdir -p $(DESTDIR)/opt/rudder/share/selinux/ - mkdir -p $(DESTDIR)/opt/rudder/share/package-scripts/ + mkdir -p $(DESTDIR)/opt/rudder/share/plugins + mkdir -p $(DESTDIR)/opt/rudder/share/upgrade-tools + mkdir -p $(DESTDIR)/opt/rudder/share/certificates + mkdir -p $(DESTDIR)/opt/rudder/share/selinux + mkdir -p $(DESTDIR)/opt/rudder/share/package-scripts mkdir -p $(DESTDIR)/var/rudder/inventories/received mkdir -p $(DESTDIR)/var/rudder/run mkdir -p $(DESTDIR)/var/rudder/ldap/openldap-data - mkdir -p $(DESTDIR)/var/log/rudder/apache2/ - mkdir -p $(DESTDIR)/var/log/rudder/webapp + mkdir -p $(DESTDIR)/var/log/rudder/apache2 + mkdir -p $(DESTDIR)/var/log/rudder/webapp/jetty + mkdir -p $(DESTDIR)/var/log/rudder/webapp/jvm + mkdir -p $(DESTDIR)/var/log/rudder/webapp/api mkdir -p $(DESTDIR)/var/log/rudder/ldap mkdir -p $(DESTDIR)/var/rudder/run mkdir -p $(DESTDIR)/etc/$(APACHE_VHOSTDIR)/ mkdir -p $(DESTDIR)/etc/$(APACHE_CONFDIR)/ - mkdir -p $(DESTDIR)/etc/sysconfig/ + mkdir -p $(DESTDIR)/etc/sysconfig mkdir -p $(DESTDIR)/etc/default mkdir -p $(DESTDIR)/usr/share/doc/rudder - mkdir -p $(DESTDIR)/usr/share/ - mkdir -p $(DESTDIR)/usr/bin/ - mkdir -p $(DESTDIR)/usr/lib/systemd/system/ - mkdir -p $(DESTDIR)/opt/rudder/share/versions/ + mkdir -p $(DESTDIR)/usr/bin + mkdir -p $(DESTDIR)/usr/lib/systemd/system + mkdir -p $(DESTDIR)/opt/rudder/share/versions cd openldap-source && make $(DEBUGOPT) install DESTDIR=$(DESTDIR) diff --git a/rudder-server/SOURCES/rudder-jetty-base/etc/console-capture.xml b/rudder-server/SOURCES/rudder-jetty-base/etc/console-capture.xml index 48255a863..938290484 100644 --- a/rudder-server/SOURCES/rudder-jetty-base/etc/console-capture.xml +++ b/rudder-server/SOURCES/rudder-jetty-base/etc/console-capture.xml @@ -5,7 +5,7 @@ - /yyyy_mm_dd.stderrout.log + /yyyy_mm_dd.stderrout.log diff --git a/rudder-server/SOURCES/rudder-jetty.conf b/rudder-server/SOURCES/rudder-jetty.conf index afc670b60..77f6f80b4 100644 --- a/rudder-server/SOURCES/rudder-jetty.conf +++ b/rudder-server/SOURCES/rudder-jetty.conf @@ -54,7 +54,7 @@ JAVA_GC=${JAVA_GC:="-XX:+UseG1GC # GC log: file path, log level (jdk format, see: # https://docs.oracle.com/en/java/javase/11/tools/java.html#GUID-BE93ABDC-999C-4CB5-A88B-1994AAAC74D5) -JAVA_GC_LOG_FILE=${JAVA_GC_LOG_FILE:="/var/log/rudder/webapp/jvm-gc.log"} +JAVA_GC_LOG_FILE=${JAVA_GC_LOG_FILE:="/var/log/rudder/webapp/jvm/jvm-gc.log"} JAVA_GC_LOG=${JAVA_GC_LOG:="gc=info,gc+cpu=info,gc+stringdedup=info"} JAVA_GC_LOG_ROTATE=${JAVA_GC_LOG_ROTATE:="filecount=5,filesize=50M"} diff --git a/rudder-server/SOURCES/rudder-jetty.default b/rudder-server/SOURCES/rudder-jetty.default index fde1aba20..253bde28f 100644 --- a/rudder-server/SOURCES/rudder-jetty.default +++ b/rudder-server/SOURCES/rudder-jetty.default @@ -45,9 +45,9 @@ JAVA_MAXPERMSIZE=256 # You can specify alternatives options for JVM GC logs: file path, log level, rotation parameters. # Configure alternative log file path. Default is: -#JAVA_GC_LOG_FILE="/var/log/rudder/webapp/jvm-gc.log" +#JAVA_GC_LOG_FILE="/var/log/rudder/webapp/jvm/jvm-gc.log" # For example for a specific file for debug logs: -#JAVA_GC_LOG_FILE="/var/log/rudder/webapp/jvm-gc-debug.log" +#JAVA_GC_LOG_FILE="/var/log/rudder/webapp/jvm/jvm-gc-debug.log" # Configure log level for debug. Default gives general info about GC timing: #JAVA_GC_LOG="gc=info,gc+cpu=info,gc+stringdedup=info"