Commit 57f77f97 authored by Nicolas Wavrant's avatar Nicolas Wavrant

slaprunner: register a hook to run after takeover. It will reload slapproxy to...

slaprunner: register a hook to run after takeover. It will reload slapproxy to update the services status
parent 75e766c1
......@@ -60,7 +60,7 @@ mode = 0644
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-runner.cfg
output = ${buildout:directory}/template-runner.cfg.in
md5sum = 07905ec872e84bc42c6ab089f5270ac2
md5sum = 9350a09ffc476af78ef9d589356c4858
mode = 0644
[template-runner-import-script]
......@@ -76,7 +76,7 @@ mode = 0644
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-runner-import.cfg.in
output = ${buildout:directory}/instance-runner-import.cfg
md5sum = 9db9957f452bda370cb2d5cc2e833e85
md5sum = eb36cecbfa1bc047278215ef32396f92
mode = 0644
[template-runner-export-script]
......
......@@ -172,6 +172,19 @@ instance-configuration =
raw takeover-url http://[$${resilient-web-takeover-httpd-configuration-file:listening-ip}]:$${resilient-web-takeover-httpd-configuration-file:listening-port}/
raw takeover-password $${resilient-web-takeover-password:passwd}
[post-takeover-hook]
recipe = collective.recipe.template
supervisor-command = $${directory:bin}/supervisorctl -c $${slaprunner:supervisord_config}
input = inline:
#!/bin/sh
$${:supervisor-command} restart slapproxy
$${:supervisor-command} start slapgrid-cp
output = $${directory:bin}/runner-post-takeover
mode = 0700
[resiliency-takeover-script]
post-takeover-hook = $${post-takeover-hook:output}
[monitor-conf-parameters]
private-path-list +=
$${directory:logrotate-backup}
......@@ -758,7 +758,7 @@ slapos-cfg = $${slaprunner:slapos.cfg}
[supervisord-conf]
recipe = slapos.recipe.template:jinja2
template = ${template-supervisord:location}/${template-supervisord:filename}
rendered = $${directory:etc}/supervisord.conf
rendered = $${slaprunner:supervisord_config}
context =
import multiprocessing multiprocessing
import builtin __builtin__
......
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