diff --git a/software/slaprunner/common.cfg b/software/slaprunner/common.cfg index 25615a8f68955969fa52a6abb734e52f58958c11..d26ede5a4179fd5075ded0355c33a24bed362a26 100644 --- a/software/slaprunner/common.cfg +++ b/software/slaprunner/common.cfg @@ -44,7 +44,7 @@ mode = 0644 recipe = slapos.recipe.template url = ${:_profile_base_location_}/instance-runner.cfg output = ${buildout:directory}/template-runner.cfg.in -md5sum = d3821fef9182b2f1c096117aaeb118da +md5sum = 2c1ea4e4e2fdb6ee2f3e893c9da9b4f8 mode = 0644 [template-runner-import-script] @@ -146,7 +146,7 @@ mode = 0644 [template-supervisord] recipe = hexagonit.recipe.download url = ${:_profile_base_location_}/template/${:filename} -md5sum = f1f08f789195dc62b66c45e130f4114d +md5sum = 15500060605c0224d3534af60b07c6be location = ${buildout:parts-directory}/${:_buildout_section_name_} filename = supervisord.conf.in download-only = true diff --git a/software/slaprunner/instance-runner.cfg b/software/slaprunner/instance-runner.cfg index 6a40a2a3ada7deba181d3fdeffa82f9adfee4b3c..3d83a195a1074acbee369b1b4e029eb0b2a8609b 100644 --- a/software/slaprunner/instance-runner.cfg +++ b/software/slaprunner/instance-runner.cfg @@ -627,6 +627,7 @@ autostart = false directory = $${buildout:directory} exitcodes = 0 logfile = $${directory:log}/supervisord.log +no_logfile = NONE numprocs = 1 path = $${environ:PATH} pidfile = $${directory:run}/supervisord.pid @@ -644,7 +645,9 @@ slapgrid-sr-startretries = 2 socket_name = unix://$${:socket_path} socket_path = $${directory:tmp}/supervisord.sock startsecs = 1 -stdout_logfile = NONE +# This file logs errors from listeners. Supervisord has its own logfile. +# Processes should handle their logs by themselves +stderr_logfile = $${directory:log}/supervisord-errors.log [supervisord-conf] recipe = slapos.recipe.template:jinja2 diff --git a/software/slaprunner/template/supervisord.conf.in b/software/slaprunner/template/supervisord.conf.in index abab316ab861dab75244ed88e31e5d7ae8640e4e..05d9c611b9b2dce99100ec329c03087d3fd760e6 100644 --- a/software/slaprunner/template/supervisord.conf.in +++ b/software/slaprunner/template/supervisord.conf.in @@ -23,8 +23,8 @@ exitcodes = {{ supervisord['exitcodes'] }} startretries = {{ supervisord['slapgrid-sr-startretries'] }} startsecs = {{ supervisord['startsecs'] }} autorestart = {{ supervisord['autorestart'] }} -stdout_logfile = {{ supervisord['stdout_logfile'] }} -stderr_logfile = {{ supervisord['stdout_logfile'] }} +stdout_logfile = {{ supervisord['no_logfile'] }} +stderr_logfile = {{ supervisord['no_logfile'] }} directory = {{ supervisord['directory'] }} environment = PATH="{{- supervisord['path'] -}}" @@ -37,11 +37,13 @@ exitcodes = {{ supervisord['exitcodes'] }} startretries = {{ supervisord['slapgrid-cp-startretries'] }} startsecs = {{ supervisord['startsecs'] }} autorestart = {{ supervisord['autorestart'] }} -stdout_logfile = {{ supervisord['stdout_logfile'] }} -stderr_logfile = {{ supervisord['stdout_logfile'] }} +stdout_logfile = {{ supervisord['no_logfile'] }} +stderr_logfile = {{ supervisord['no_logfile'] }} directory = {{ supervisord['directory'] }} environment = PATH="{{- supervisord['path'] -}}" [eventlistener:listener-slapgrid] command = {{ listener_slapgrid }} events = PROCESS_STATE_EXITED +stdout_logfile = {{ supervisord['no_logfile'] }} +stderr_logfile = {{ supervisord['stderr_logfile'] }}