Commit 011857f5 authored by Alain Takoudjou's avatar Alain Takoudjou

fix undefinedError for monitor port

parent 8f47ccd0
...@@ -9,8 +9,8 @@ ...@@ -9,8 +9,8 @@
{% set monitor_port = monitor_dict.get('port-base', 2600) %} {% set monitor_port = monitor_dict.get('port-base', 2600) %}
{% if mariadb_dict.get('monitor', False) -%} {% if mariadb_dict.get('monitor', False) -%}
{% do mariadb_request_dict.__setitem__('monitor-port', mariadb_dict.get('monitor-port', monitor_port)) -%} {% do mariadb_request_dict.__setitem__('monitor-port', mariadb_dict.get('monitor-port', monitor_port)) -%}
{% set monitor_port_balancer = monitor_port + 1 -%}
{% endif -%} {% endif -%}
{% set monitor_port_balancer = monitor_port + 1 -%}
{% set port_count = 2 -%} {% set port_count = 2 -%}
[request-common] [request-common]
...@@ -178,7 +178,9 @@ config-haproxy-server-check-path = {{ dumps(balancer_dict.get('haproxy-server-ch ...@@ -178,7 +178,9 @@ config-haproxy-server-check-path = {{ dumps(balancer_dict.get('haproxy-server-ch
config-ssl = {{ dumps(balancer_dict.get('ssl', {})) }} config-ssl = {{ dumps(balancer_dict.get('ssl', {})) }}
config-certificate-authority-path = ${directory:ca-dir} config-certificate-authority-path = ${directory:ca-dir}
config-monitor = {{ dumps(slapparameter_dict.get('monitoring', True)) }} config-monitor = {{ dumps(slapparameter_dict.get('monitoring', True)) }}
{% if slapparameter_dict.get('monitoring', True) -%}
config-monitor-port = {{ monitor_port_balancer }} config-monitor-port = {{ monitor_port_balancer }}
{% endif -%}
[request-frontend-base] [request-frontend-base]
{% if has_frontend -%} {% if has_frontend -%}
......
...@@ -72,7 +72,7 @@ mode = 644 ...@@ -72,7 +72,7 @@ mode = 644
[template-erp5] [template-erp5]
< = download-base-part < = download-base-part
filename = instance-erp5.cfg.in filename = instance-erp5.cfg.in
md5sum = cf1fc493af0513e02ab106bc864b5d28 md5sum = 5051f8989f37965b1dd974d115feab3d
[template-balancer] [template-balancer]
< = download-base-part < = download-base-part
......
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