Commit 20f84c4a authored by Nicolas Wavrant's avatar Nicolas Wavrant

slaprunner: supervisor handles better log files

parent c52132bb
...@@ -44,7 +44,7 @@ mode = 0644 ...@@ -44,7 +44,7 @@ mode = 0644
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-runner.cfg url = ${:_profile_base_location_}/instance-runner.cfg
output = ${buildout:directory}/template-runner.cfg.in output = ${buildout:directory}/template-runner.cfg.in
md5sum = d3821fef9182b2f1c096117aaeb118da md5sum = 2c1ea4e4e2fdb6ee2f3e893c9da9b4f8
mode = 0644 mode = 0644
[template-runner-import-script] [template-runner-import-script]
...@@ -146,7 +146,7 @@ mode = 0644 ...@@ -146,7 +146,7 @@ mode = 0644
[template-supervisord] [template-supervisord]
recipe = hexagonit.recipe.download recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/template/${:filename} url = ${:_profile_base_location_}/template/${:filename}
md5sum = f1f08f789195dc62b66c45e130f4114d md5sum = 15500060605c0224d3534af60b07c6be
location = ${buildout:parts-directory}/${:_buildout_section_name_} location = ${buildout:parts-directory}/${:_buildout_section_name_}
filename = supervisord.conf.in filename = supervisord.conf.in
download-only = true download-only = true
......
...@@ -627,6 +627,7 @@ autostart = false ...@@ -627,6 +627,7 @@ autostart = false
directory = $${buildout:directory} directory = $${buildout:directory}
exitcodes = 0 exitcodes = 0
logfile = $${directory:log}/supervisord.log logfile = $${directory:log}/supervisord.log
no_logfile = NONE
numprocs = 1 numprocs = 1
path = $${environ:PATH} path = $${environ:PATH}
pidfile = $${directory:run}/supervisord.pid pidfile = $${directory:run}/supervisord.pid
...@@ -644,7 +645,9 @@ slapgrid-sr-startretries = 2 ...@@ -644,7 +645,9 @@ slapgrid-sr-startretries = 2
socket_name = unix://$${:socket_path} socket_name = unix://$${:socket_path}
socket_path = $${directory:tmp}/supervisord.sock socket_path = $${directory:tmp}/supervisord.sock
startsecs = 1 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] [supervisord-conf]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
......
...@@ -23,8 +23,8 @@ exitcodes = {{ supervisord['exitcodes'] }} ...@@ -23,8 +23,8 @@ exitcodes = {{ supervisord['exitcodes'] }}
startretries = {{ supervisord['slapgrid-sr-startretries'] }} startretries = {{ supervisord['slapgrid-sr-startretries'] }}
startsecs = {{ supervisord['startsecs'] }} startsecs = {{ supervisord['startsecs'] }}
autorestart = {{ supervisord['autorestart'] }} autorestart = {{ supervisord['autorestart'] }}
stdout_logfile = {{ supervisord['stdout_logfile'] }} stdout_logfile = {{ supervisord['no_logfile'] }}
stderr_logfile = {{ supervisord['stdout_logfile'] }} stderr_logfile = {{ supervisord['no_logfile'] }}
directory = {{ supervisord['directory'] }} directory = {{ supervisord['directory'] }}
environment = PATH="{{- supervisord['path'] -}}" environment = PATH="{{- supervisord['path'] -}}"
...@@ -37,11 +37,13 @@ exitcodes = {{ supervisord['exitcodes'] }} ...@@ -37,11 +37,13 @@ exitcodes = {{ supervisord['exitcodes'] }}
startretries = {{ supervisord['slapgrid-cp-startretries'] }} startretries = {{ supervisord['slapgrid-cp-startretries'] }}
startsecs = {{ supervisord['startsecs'] }} startsecs = {{ supervisord['startsecs'] }}
autorestart = {{ supervisord['autorestart'] }} autorestart = {{ supervisord['autorestart'] }}
stdout_logfile = {{ supervisord['stdout_logfile'] }} stdout_logfile = {{ supervisord['no_logfile'] }}
stderr_logfile = {{ supervisord['stdout_logfile'] }} stderr_logfile = {{ supervisord['no_logfile'] }}
directory = {{ supervisord['directory'] }} directory = {{ supervisord['directory'] }}
environment = PATH="{{- supervisord['path'] -}}" environment = PATH="{{- supervisord['path'] -}}"
[eventlistener:listener-slapgrid] [eventlistener:listener-slapgrid]
command = {{ listener_slapgrid }} command = {{ listener_slapgrid }}
events = PROCESS_STATE_EXITED events = PROCESS_STATE_EXITED
stdout_logfile = {{ supervisord['no_logfile'] }}
stderr_logfile = {{ supervisord['stderr_logfile'] }}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment