From 15558474077af968545c4a0c46441ec2ee592606 Mon Sep 17 00:00:00 2001 From: Ashwin Srinivasan Date: Tue, 26 Nov 2024 22:14:07 +0000 Subject: [PATCH] Made /var/log/supervisor tmpfs instead of changing log directory on all containers --- dockers/docker-base-bookworm/etc/supervisor/supervisord.conf | 4 ++-- dockers/docker-base-bullseye/etc/supervisor/supervisord.conf | 4 ++-- files/build_templates/docker_image_ctl.j2 | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/dockers/docker-base-bookworm/etc/supervisor/supervisord.conf b/dockers/docker-base-bookworm/etc/supervisor/supervisord.conf index 49ceb54b066e..6d7d7390e854 100644 --- a/dockers/docker-base-bookworm/etc/supervisor/supervisord.conf +++ b/dockers/docker-base-bookworm/etc/supervisor/supervisord.conf @@ -5,9 +5,9 @@ file=/var/run/supervisor.sock ; (the path to the socket file) chmod=0700 ; socket file mode (default 0700) [supervisord] -logfile=/dev/shm/supervisor/supervisord.log ; (main log file;default $CWD/supervisord.log) +logfile=/var/log/supervisor/supervisord.log ; (main log file;default $CWD/supervisord.log) pidfile=/var/run/supervisord.pid ; (supervisord pidfile;default supervisord.pid) -childlogdir=/dev/shm/supervisor ; ('AUTO' child log dir, default $TEMP) +childlogdir=/var/log/supervisor ; ('AUTO' child log dir, default $TEMP) user=root ; the below section must remain in the config file for RPC diff --git a/dockers/docker-base-bullseye/etc/supervisor/supervisord.conf b/dockers/docker-base-bullseye/etc/supervisor/supervisord.conf index 49ceb54b066e..6d7d7390e854 100644 --- a/dockers/docker-base-bullseye/etc/supervisor/supervisord.conf +++ b/dockers/docker-base-bullseye/etc/supervisor/supervisord.conf @@ -5,9 +5,9 @@ file=/var/run/supervisor.sock ; (the path to the socket file) chmod=0700 ; socket file mode (default 0700) [supervisord] -logfile=/dev/shm/supervisor/supervisord.log ; (main log file;default $CWD/supervisord.log) +logfile=/var/log/supervisor/supervisord.log ; (main log file;default $CWD/supervisord.log) pidfile=/var/run/supervisord.pid ; (supervisord pidfile;default supervisord.pid) -childlogdir=/dev/shm/supervisor ; ('AUTO' child log dir, default $TEMP) +childlogdir=/var/log/supervisor ; ('AUTO' child log dir, default $TEMP) user=root ; the below section must remain in the config file for RPC diff --git a/files/build_templates/docker_image_ctl.j2 b/files/build_templates/docker_image_ctl.j2 index 294dd46ce1e7..d8e562cdd3a7 100644 --- a/files/build_templates/docker_image_ctl.j2 +++ b/files/build_templates/docker_image_ctl.j2 @@ -631,6 +631,7 @@ start() { {%- endif %} -e RUNTIME_OWNER=local \ --uts=host \{# W/A: this should be set per-docker, for those dockers which really need host's UTS namespace #} + --tmpfs /var/log/supervisor:rw \ {%- if install_debug_image == "y" %} -v /src:/src:ro -v /debug:/debug:rw \ {%- endif %}