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