Commit 9faf639a authored by Nicolas Wavrant's avatar Nicolas Wavrant

slaprunner-resilient: resilient-clone-number parameter is now 2 maximum

So that it corresponds better to its name
parent 931a89ef
...@@ -80,7 +80,7 @@ mode = 0644 ...@@ -80,7 +80,7 @@ mode = 0644
[template-resilient] [template-resilient]
recipe = slapos.recipe.download recipe = slapos.recipe.download
url = ${:_profile_base_location_}/instance-resilient.cfg.jinja2 url = ${:_profile_base_location_}/instance-resilient.cfg.jinja2
md5sum = e185dae17a563dcb0779b78faff93bdc md5sum = f3d1dfbe2ef89bc14ef688b9ce23fbe5
filename = instance-resilient.cfg.jinja2 filename = instance-resilient.cfg.jinja2
mode = 0644 mode = 0644
......
...@@ -6,9 +6,9 @@ ...@@ -6,9 +6,9 @@
{% do slapparameter_dict.__setitem__('auto-deploy', slapparameter_dict.get('auto-deploy', 'true')) %} {% do slapparameter_dict.__setitem__('auto-deploy', slapparameter_dict.get('auto-deploy', 'true')) %}
{% do slapparameter_dict.__setitem__('auto-deploy-instance', slapparameter_dict.get('auto-deploy-instance', 'false')) %} {% do slapparameter_dict.__setitem__('auto-deploy-instance', slapparameter_dict.get('auto-deploy-instance', 'false')) %}
# let decide the number of clones we want. We can't have more than 2 clones # let decide the number of clones we want. We can't have more than 2 clones
{% set number_of_instances = slapparameter_dict.get('resilient-clone-number', 3)|int %} {% set number_of_instances = slapparameter_dict.get('resilient-clone-number', 2)|int %}
{% if number_of_instances > 3 %} {% if number_of_instances > 2 %}
{% set number_of_instances = 3 %} {% set number_of_instances = 2 %}
{% endif %} {% endif %}
{% import 'parts' as parts %} {% import 'parts' as parts %}
...@@ -21,10 +21,10 @@ offline = true ...@@ -21,10 +21,10 @@ offline = true
# += because we need to take up parts (like instance-custom, slapmonitor etc) from the profile we extended # += because we need to take up parts (like instance-custom, slapmonitor etc) from the profile we extended
parts += parts +=
{{ parts.replicate("runner", number_of_instances) }} {{ parts.replicate("runner", number_of_instances + 1) }}
publish-connection-informations publish-connection-informations
{{ replicated.replicate("runner", number_of_instances, "runner-export", "runner-import", slapparameter_dict=slapparameter_dict) }} {{ replicated.replicate("runner", number_of_instances + 1, "runner-export", "runner-import", slapparameter_dict=slapparameter_dict) }}
# Bubble up the parameters # Bubble up the parameters
[request-runner] [request-runner]
...@@ -55,4 +55,4 @@ domain = ...@@ -55,4 +55,4 @@ domain =
authorized-key = authorized-key =
instance-amount = 10 instance-amount = 10
debug = false debug = false
resilient-clone-number = 3 resilient-clone-number = 2
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