Commit c1effb31 authored by Vincent Pelletier's avatar Vincent Pelletier

erp5.zope: Fix deadlock debugger password.

Escaping is right, but "raw" context entry type does not de-serialise, so
deadlock debugger password was stored in an unintended format. Moving
deadlock_debugger_password to a buildout section involves required magic.
Move other parameters for consistency.
Also, honour deadlock_path parameter, which was previously ignored.
parent 4da6edc4
...@@ -207,7 +207,7 @@ md5sum = 6d52007d9bdc25ed0c83a49d63d59a18 ...@@ -207,7 +207,7 @@ md5sum = 6d52007d9bdc25ed0c83a49d63d59a18
[template-zope-conf] [template-zope-conf]
< = download-base < = download-base
filename = zope.conf.in filename = zope.conf.in
md5sum = 5ad1664a39fbab5f8450c7fb36c81945 md5sum = ef754491384c3298790383b73e7fbed3
[template-my-cnf] [template-my-cnf]
< = download-base < = download-base
...@@ -313,7 +313,7 @@ md5sum = 6b99d2712aff3a8a717400a557dc5191 ...@@ -313,7 +313,7 @@ md5sum = 6b99d2712aff3a8a717400a557dc5191
[template-zope] [template-zope]
< = download-base < = download-base
filename = instance-zope.cfg.in filename = instance-zope.cfg.in
md5sum = 4e90f7eae9e14d47077e3d884fe79474 md5sum = 52f98b07e27cc779fee8e09af0edd792
link-binary = link-binary =
${aspell:location}/bin/aspell ${aspell:location}/bin/aspell
${coreutils:location}/bin/basename ${coreutils:location}/bin/basename
......
...@@ -189,20 +189,17 @@ site-id = {{ site_id }} ...@@ -189,20 +189,17 @@ site-id = {{ site_id }}
{% endfor -%} {% endfor -%}
zodb-list = {{ dumps(zodb_list) }} zodb-list = {{ dumps(zodb_list) }}
developer-list = {{ dumps(slapparameter_dict['developer-list']) }} developer-list = {{ dumps(slapparameter_dict['developer-list']) }}
instance = ${directory:instance}
instance-products = ${directory:instance-products}
deadlock-path = /manage_debug_threads
deadlock-debugger-password = {{ dumps(slapparameter_dict['deadlock-debugger-password']) }}
tidstorage-ip = ${tidstorage:ipv4}
tidstorage-port = ${tidstorage:ipv4-port}
promise-path = ${erp5-promise:promise-path}
[zope-conf-base] [zope-conf-base]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = {{ parameter_dict['zope-conf-template'] }} template = {{ parameter_dict['zope-conf-template'] }}
extra-context =
context =
key instance directory:instance
key instance_products directory:instance-products
raw deadlock_path /manage_debug_threads
raw deadlock_debugger_password {{ dumps(slapparameter_dict['deadlock-debugger-password']) }}
key tidstorage_ip tidstorage:ipv4
key tidstorage_port tidstorage:ipv4-port
key promise_path erp5-promise:promise-path
${:extra-context}
[logrotate-entry-base] [logrotate-entry-base]
recipe = slapos.cookbook:logrotate.d recipe = slapos.cookbook:logrotate.d
...@@ -234,7 +231,7 @@ z2-log = ${directory:log}/{{ name }}-Z2.log ...@@ -234,7 +231,7 @@ z2-log = ${directory:log}/{{ name }}-Z2.log
[{{ conf_name }}] [{{ conf_name }}]
< = zope-conf-base < = zope-conf-base
rendered = ${directory:etc}/{{ name }}.conf rendered = ${directory:etc}/{{ name }}.conf
extra-context = context =
section parameter_dict {{ conf_parameter_name }} section parameter_dict {{ conf_parameter_name }}
[{{ name }}] [{{ name }}]
......
# Note: Environment is setup in running wrapper script, as zope.conf is read # Note: Environment is setup in running wrapper script, as zope.conf is read
# too late for some components. # too late for some components.
%define INSTANCE {{ instance }} %define INSTANCE {{ parameter_dict['instance'] }}
instancehome $INSTANCE instancehome $INSTANCE
zserver-threads {{ parameter_dict['thread-amount'] }} zserver-threads {{ parameter_dict['thread-amount'] }}
# When ownership checking is enabled, the roles a script runs as are the # When ownership checking is enabled, the roles a script runs as are the
...@@ -20,7 +20,7 @@ rest-input-encoding utf-8 ...@@ -20,7 +20,7 @@ rest-input-encoding utf-8
rest-output-encoding utf-8 rest-output-encoding utf-8
# XXX: isn't this entry implicit ? # XXX: isn't this entry implicit ?
products {{ instance_products }} products {{ parameter_dict['instance-products'] }}
<http-server> <http-server>
address {{ parameter_dict['ip'] }}:{{ parameter_dict['port'] }} address {{ parameter_dict['ip'] }}:{{ parameter_dict['port'] }}
...@@ -40,14 +40,14 @@ products {{ instance_products }} ...@@ -40,14 +40,14 @@ products {{ instance_products }}
</zoperunner> </zoperunner>
<product-config DeadlockDebugger> <product-config DeadlockDebugger>
dump_url /manage_debug_threads dump_url {{ parameter_dict['deadlock-path'] }}
secret {{ deadlock_debugger_password }} secret {{ parameter_dict['deadlock-debugger-password'] }}
</product-config> </product-config>
{% if tidstorage_ip -%} {% if tidstorage_ip -%}
<product-config TIDStorage> <product-config TIDStorage>
backend-ip {{ tidstorage_ip }} backend-ip {{ parameter_dict['tidstorage-ip'] }}
backend-port {{ tidstorage_port }} backend-port {{ parameter_dict['tidstorage-port'] }}
</product-config> </product-config>
{% endif -%} {% endif -%}
...@@ -59,6 +59,7 @@ products {{ instance_products }} ...@@ -59,6 +59,7 @@ products {{ instance_products }}
</timer-server> </timer-server>
{% endif -%} {% endif -%}
{% set promise_path = parameter_dict['promise-path'] -%}
{% if promise_path -%} {% if promise_path -%}
<product-config /{{ parameter_dict['site-id'] }}> <product-config /{{ parameter_dict['site-id'] }}>
promise_path {{ promise_path }} promise_path {{ promise_path }}
......
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