From b7a266beef0731a58f7a15159bc179277819e367 Mon Sep 17 00:00:00 2001 From: Kory Draughn Date: Fri, 9 Aug 2024 15:27:00 -0400 Subject: [PATCH] [#453] Configure and start rsyslog for iRODS server. --- docker-test-framework/4-3/Dockerfile.consumer | 3 +++ docker-test-framework/4-3/Dockerfile.provider | 3 +++ docker-test-framework/4-3/irods.rsyslog | 8 ++++++++ docker-test-framework/4-3/start_consumer.sh | 4 ++++ docker-test-framework/4-3/start_provider.sh | 4 ++++ 5 files changed, 22 insertions(+) create mode 100644 docker-test-framework/4-3/irods.rsyslog diff --git a/docker-test-framework/4-3/Dockerfile.consumer b/docker-test-framework/4-3/Dockerfile.consumer index 65b010ea8..1294e248b 100644 --- a/docker-test-framework/4-3/Dockerfile.consumer +++ b/docker-test-framework/4-3/Dockerfile.consumer @@ -21,6 +21,9 @@ RUN wget -qO - https://packages.irods.org/irods-signing-key.asc | apt-key add -; EXPOSE 1247 1248 +# Configure rsyslog for iRODS. +COPY irods.rsyslog /etc/rsyslog.d/00-irods.conf + # Set command to execute when launching the container. ADD start_consumer.sh irods_consumer.input / RUN chmod u+x /start_consumer.sh diff --git a/docker-test-framework/4-3/Dockerfile.provider b/docker-test-framework/4-3/Dockerfile.provider index 27a4f5e2f..ea60f2c47 100644 --- a/docker-test-framework/4-3/Dockerfile.provider +++ b/docker-test-framework/4-3/Dockerfile.provider @@ -28,6 +28,9 @@ RUN wget -qO - https://packages.irods.org/irods-signing-key.asc | apt-key add -; EXPOSE 1247 1248 +# Configure rsyslog for iRODS. +COPY irods.rsyslog /etc/rsyslog.d/00-irods.conf + # Set command to execute when launching the container. ADD start_provider.sh / ADD testsetup-consortium.sh / diff --git a/docker-test-framework/4-3/irods.rsyslog b/docker-test-framework/4-3/irods.rsyslog new file mode 100644 index 000000000..106050597 --- /dev/null +++ b/docker-test-framework/4-3/irods.rsyslog @@ -0,0 +1,8 @@ +$FileCreateMode 0644 +$DirCreateMode 0755 +$Umask 0000 +$template irods_format,"%msg%\n" +:programname,startswith,"irodsServer" /var/log/irods/irods.log;irods_format +& stop +:programname,startswith,"irodsDelayServer" /var/log/irods/irods.log;irods_format +& stop diff --git a/docker-test-framework/4-3/start_consumer.sh b/docker-test-framework/4-3/start_consumer.sh index 981f45061..9141eb275 100755 --- a/docker-test-framework/4-3/start_consumer.sh +++ b/docker-test-framework/4-3/start_consumer.sh @@ -15,6 +15,10 @@ until nc -z $topo_provider 1247; do sleep 1 done +# Rsyslog must be started before iRODS so that the log messages +# are written to the correct file. +rsyslogd + # Set up iRODS. python3 /var/lib/irods/scripts/setup_irods.py < /irods_consumer.input su - irods -c './irodsctl -v start' diff --git a/docker-test-framework/4-3/start_provider.sh b/docker-test-framework/4-3/start_provider.sh index 8ade46a72..9220e7f01 100755 --- a/docker-test-framework/4-3/start_provider.sh +++ b/docker-test-framework/4-3/start_provider.sh @@ -10,6 +10,10 @@ do done echo Postgres took approximately $counter seconds to fully start ... +# Rsyslog must be started before iRODS so that the log messages +# are written to the correct file. +rsyslogd + # Set up iRODS. python3 /var/lib/irods/scripts/setup_irods.py < /var/lib/irods/packaging/localhost_setup_postgres.input su - irods -c './irodsctl -v start'