Commit 34b396f4 authored by Jérome Perrin's avatar Jérome Perrin

stack/caucase: make services auto restart on config change

use hash-existing-files feature of wrapper recipe to make
sevices restart automatically when they are re-requested with different
parameters.
parent 355aa844
......@@ -427,12 +427,13 @@ class TestTLS(BalancerTestCase):
# run caucase updater 90 days in the future, so that certificate is
# renewed.
caucase_updater = os.path.join(
self.computer_partition_root_path,
'etc',
'service',
'caucase-updater',
)
caucase_updater, = glob.glob(
os.path.join(
self.computer_partition_root_path,
'etc',
'service',
'caucase-updater*',
))
process = pexpect.spawnu(
"faketime +90days %s" % caucase_updater,
env=dict(os.environ, PYTHONPATH=''),
......@@ -772,7 +773,7 @@ class TestClientTLS(BalancerTestCase):
self.computer_partition_root_path,
'etc',
'service',
'caucase-updater-*',
'caucase-updater-*-*',
))
self.assertEqual(len(caucase_updater_list), 2)
......
......@@ -15,4 +15,4 @@
[caucase-jinja2-library]
filename = caucase.jinja2.library
md5sum = a59dec6d2ecc1cc4dcd0292d571c79d8
md5sum = b0f0d99882e65fe5942d675bcfb3b06d
......@@ -27,6 +27,8 @@ command-line = '{{ buildout_bin_directory }}/caucased'
--service-auto-approve-count '{{ service_auto_approve_count }}'
--user-auto-approve-count '{{ user_auto_approve_count }}'
--lock-auto-approve-count
hash-existing-files =
${buildout:directory}/software_release/buildout.cfg
{% if promise -%}
[{{ prefix }}-promise]
......@@ -110,6 +112,8 @@ command-line = '{{ buildout_bin_directory }}/caucase-updater'
{% if key_path %}--key '{{ key_path }}' {%- endif %}
{% if on_renew %}--on-renew '{{ on_renew }}' {%- endif %}
{% if max_sleep %}--max-sleep '{{ max_sleep }}' {%- endif %}
hash-existing-files =
${buildout:directory}/software_release/buildout.cfg
{% if promise -%}
[{{ prefix }}-promise]
<= monitor-promise-base
......
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