Commit 823ba86d authored by Hardik Juneja's avatar Hardik Juneja Committed by Rafael Monnerat

Prevent having same monitor title for each zope instance

whenever the zope instances have the same title (example all zope have 'Zope monitor' as title) the request to frontends consider it as the same request and gives same frontend to each of them.

/reviewed-on nexedi/slapos!202
parent 70f6aa73
...@@ -23,15 +23,15 @@ md5sum = dc974bd74cf967ae6250d81322629c44 ...@@ -23,15 +23,15 @@ md5sum = dc974bd74cf967ae6250d81322629c44
[template-mariadb] [template-mariadb]
filename = instance-mariadb.cfg.in filename = instance-mariadb.cfg.in
md5sum = 3b6c19686ac52c2d452597dbacc88888 md5sum = 2126e64bc70893500dc24c29770e84c8
[template-kumofs] [template-kumofs]
filename = instance-kumofs.cfg.in filename = instance-kumofs.cfg.in
md5sum = 253027f37c4e5bd908e6af551848f03a md5sum = 091d3c3feb2d543d176b0fadb11c07dc
[template-cloudooo] [template-cloudooo]
filename = instance-cloudoo.cfg.in filename = instance-cloudoo.cfg.in
md5sum = 43253cbfd5d361047ba6a99b116b2370 md5sum = 76f9e8c8cdc352081e34539d8fc17026
[template-zope-conf] [template-zope-conf]
filename = zope.conf.in filename = zope.conf.in
...@@ -83,19 +83,19 @@ md5sum = d41d8cd98f00b204e9800998ecf8427e ...@@ -83,19 +83,19 @@ md5sum = d41d8cd98f00b204e9800998ecf8427e
[template-erp5] [template-erp5]
filename = instance-erp5.cfg.in filename = instance-erp5.cfg.in
md5sum = 13638031b6b6c9ad9c0a9c4e6d9a202a md5sum = 03983ea97d53e40bf3caf3d6744e1137
[template-zeo] [template-zeo]
filename = instance-zeo.cfg.in filename = instance-zeo.cfg.in
md5sum = 2248d249cfc53c73e7c65665d4d53be0 md5sum = d1f33d406d528ae27d973e2dd0efb1ba
[template-zope] [template-zope]
filename = instance-zope.cfg.in filename = instance-zope.cfg.in
md5sum = 6a64d1615c3ef9f6311c863d5aa0c58f md5sum = a2377d5c53fd2a441ea713b428e4844b
[template-balancer] [template-balancer]
filename = instance-balancer.cfg.in filename = instance-balancer.cfg.in
md5sum = f2fb0c537c124622fe8e89afe0188519 md5sum = d2a339d0bc2f05f3f1f78defffae6ab6
[template-haproxy-cfg] [template-haproxy-cfg]
filename = haproxy.cfg.in filename = haproxy.cfg.in
......
...@@ -303,7 +303,7 @@ erp5-base-list = ${monitor-directory:etc}/apdex_erp5_base_list ...@@ -303,7 +303,7 @@ erp5-base-list = ${monitor-directory:etc}/apdex_erp5_base_list
[monitor-instance-parameter] [monitor-instance-parameter]
monitor-httpd-ipv6 = {{ (ipv6_set | list)[0] }} monitor-httpd-ipv6 = {{ (ipv6_set | list)[0] }}
monitor-httpd-port = {{ next_port() }} monitor-httpd-port = {{ next_port() }}
monitor-title = Balancer monitor monitor-title = {{ slapparameter_dict['name'] }}
password = {{ slapparameter_dict['monitor-passwd'] }} password = {{ slapparameter_dict['monitor-passwd'] }}
instance-configuration = instance-configuration =
file apachedex-default ${apachedex-parameters:default} file apachedex-default ${apachedex-parameters:default}
......
...@@ -111,7 +111,7 @@ framebuffer = ${:srv}/framebuffer ...@@ -111,7 +111,7 @@ framebuffer = ${:srv}/framebuffer
[monitor-instance-parameter] [monitor-instance-parameter]
monitor-httpd-ipv6 = {{ (ipv6_set | list)[0] }} monitor-httpd-ipv6 = {{ (ipv6_set | list)[0] }}
monitor-httpd-port = {{ tcpv4_port + 2 }} monitor-httpd-port = {{ tcpv4_port + 2 }}
monitor-title = Cloudooo monitor monitor-title = {{ slapparameter_dict['name'] }}
password = {{ slapparameter_dict['monitor-passwd'] }} password = {{ slapparameter_dict['monitor-passwd'] }}
[binary-link] [binary-link]
......
...@@ -38,6 +38,7 @@ config-{{ k }} = {{ dumps(v) }} ...@@ -38,6 +38,7 @@ config-{{ k }} = {{ dumps(v) }}
{% for k, v in key_config.iteritems() -%} {% for k, v in key_config.iteritems() -%}
config-{{ k }} = {{ '${' ~ v ~ '}' }} config-{{ k }} = {{ '${' ~ v ~ '}' }}
{% endfor -%} {% endfor -%}
config-name = {{ name }}
{% endmacro -%} {% endmacro -%}
{{ request('memcached-persistent', 'kumofs', 'kumofs', {'tcpv4-port': 2000}, {'url': True, 'monitor-base-url': False}, key_config={'monitor-passwd': 'monitor-htpasswd:passwd'}) }} {{ request('memcached-persistent', 'kumofs', 'kumofs', {'tcpv4-port': 2000}, {'url': True, 'monitor-base-url': False}, key_config={'monitor-passwd': 'monitor-htpasswd:passwd'}) }}
...@@ -208,6 +209,7 @@ config-longrequest-logger-interval = {{ dumps(zope_parameter_dict.get('longreque ...@@ -208,6 +209,7 @@ config-longrequest-logger-interval = {{ dumps(zope_parameter_dict.get('longreque
config-longrequest-logger-timeout = {{ dumps(zope_parameter_dict.get('longrequest-logger-timeout', 1)) }} config-longrequest-logger-timeout = {{ dumps(zope_parameter_dict.get('longrequest-logger-timeout', 1)) }}
config-port-base = {{ dumps(zope_parameter_dict.get('port-base', 2200)) }} config-port-base = {{ dumps(zope_parameter_dict.get('port-base', 2200)) }}
config-webdav = {{ dumps(zope_parameter_dict.get('webdav', False)) }} config-webdav = {{ dumps(zope_parameter_dict.get('webdav', False)) }}
config-name = {{ partition_name }}
{% endfor -%} {% endfor -%}
{# if not explicitly configured, connect jupyter to first zope family, which -#} {# if not explicitly configured, connect jupyter to first zope family, which -#}
...@@ -274,6 +276,7 @@ config-{{ name }} = {{ ' ${' ~ zope_section_id ~ ':connection-zope-address-list} ...@@ -274,6 +276,7 @@ config-{{ name }} = {{ ' ${' ~ zope_section_id ~ ':connection-zope-address-list}
config-haproxy-server-check-path = {{ dumps(balancer_dict.get('haproxy-server-check-path', '/') % {'site-id': site_id}) }} config-haproxy-server-check-path = {{ dumps(balancer_dict.get('haproxy-server-check-path', '/') % {'site-id': site_id}) }}
config-ssl = {{ dumps(balancer_dict.get('ssl', {})) }} config-ssl = {{ dumps(balancer_dict.get('ssl', {})) }}
config-monitor-passwd = ${monitor-htpasswd:passwd} config-monitor-passwd = ${monitor-htpasswd:passwd}
config-name = ${:name}
config-caucase-url = ${request-caucase:connection-http-url} config-caucase-url = ${request-caucase:connection-http-url}
config-crl-update-periodicity = {{ crl_update_period }} config-crl-update-periodicity = {{ crl_update_period }}
config-backend-path-dict = {{ dumps(zope_backend_path_dict) }} config-backend-path-dict = {{ dumps(zope_backend_path_dict) }}
...@@ -331,7 +334,7 @@ parts += ...@@ -331,7 +334,7 @@ parts +=
monitor-base monitor-base
[monitor-conf-parameters] [monitor-conf-parameters]
monitor-title = ERP5 monitor monitor-title = ERP5
password = ${monitor-htpasswd:passwd} password = ${monitor-htpasswd:passwd}
[monitor-base-url-dict] [monitor-base-url-dict]
......
...@@ -112,5 +112,5 @@ port = ${kumofs-instance:manager-port} ...@@ -112,5 +112,5 @@ port = ${kumofs-instance:manager-port}
[monitor-instance-parameter] [monitor-instance-parameter]
monitor-httpd-ipv6 = {{ (ipv6_set | list)[0] }} monitor-httpd-ipv6 = {{ (ipv6_set | list)[0] }}
monitor-httpd-port = {{ tcpv4_port + 4 }} monitor-httpd-port = {{ tcpv4_port + 4 }}
monitor-title = Kumofs monitor monitor-title = {{ slapparameter_dict['name'] }}
password = {{ slapparameter_dict['monitor-passwd'] }} password = {{ slapparameter_dict['monitor-passwd'] }}
...@@ -297,11 +297,10 @@ command-line = "{{ parameter_dict['bin-directory'] }}/is-local-tcp-port-opened" ...@@ -297,11 +297,10 @@ command-line = "{{ parameter_dict['bin-directory'] }}/is-local-tcp-port-opened"
wrapper-path = ${directory:promise}/mariadb wrapper-path = ${directory:promise}/mariadb
parameters-extra = true parameters-extra = true
{% set monitor_passwd = slapparameter_dict['monitor-passwd'] -%}
[monitor-instance-parameter] [monitor-instance-parameter]
monitor-httpd-ipv6 = {{ (ipv6_set | list)[0] }} monitor-httpd-ipv6 = {{ (ipv6_set | list)[0] }}
monitor-httpd-port = {{ port + 1 }} monitor-httpd-port = {{ port + 1 }}
monitor-title = Mariadb monitor monitor-title = {{ slapparameter_dict['name'] }}
password = {{ slapparameter_dict['monitor-passwd'] }} password = {{ slapparameter_dict['monitor-passwd'] }}
[buildout] [buildout]
......
...@@ -185,7 +185,7 @@ tidstorage = {{ tidstorage_repozo_path }} ...@@ -185,7 +185,7 @@ tidstorage = {{ tidstorage_repozo_path }}
[monitor-instance-parameter] [monitor-instance-parameter]
monitor-httpd-ipv6 = {{ (ipv6_set | list)[0] }} monitor-httpd-ipv6 = {{ (ipv6_set | list)[0] }}
monitor-httpd-port = {{ next_port() }} monitor-httpd-port = {{ next_port() }}
monitor-title = ZODB monitor monitor-title = {{ slapparameter_dict['name'] }}
password = {{ slapparameter_dict['monitor-passwd'] }} password = {{ slapparameter_dict['monitor-passwd'] }}
[buildout] [buildout]
......
...@@ -394,7 +394,7 @@ bt5-repository-url = {{ dumps(slapparameter_dict['bt5-repository-url']) }} ...@@ -394,7 +394,7 @@ bt5-repository-url = {{ dumps(slapparameter_dict['bt5-repository-url']) }}
[monitor-instance-parameter] [monitor-instance-parameter]
monitor-httpd-ipv6 = {{ (ipv6_set | list)[0] }} monitor-httpd-ipv6 = {{ (ipv6_set | list)[0] }}
monitor-httpd-port = {{ next_port() }} monitor-httpd-port = {{ next_port() }}
monitor-title = Zope monitor monitor-title = {{ slapparameter_dict['name'] }}
password = {{ slapparameter_dict['monitor-passwd'] }} password = {{ slapparameter_dict['monitor-passwd'] }}
[buildout] [buildout]
......
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