Commit eb75524b authored by Vincent Pelletier's avatar Vincent Pelletier

stack.erp5: Left-pad zope node-id integer suffix with zeroes.

This way, processing nodes are sorted the same way as the node ids, making
cross-referencing easier.
parent 5bde847f
...@@ -87,7 +87,7 @@ md5sum = 7610bafda245c008ccf0b6ea58ce21c2 ...@@ -87,7 +87,7 @@ md5sum = 7610bafda245c008ccf0b6ea58ce21c2
[template-zope] [template-zope]
filename = instance-zope.cfg.in filename = instance-zope.cfg.in
md5sum = 70caadf8819a76875cf5abf2f979f4d6 md5sum = 5e7145e8fa17046581b66e9690bf5186
[template-balancer] [template-balancer]
filename = instance-balancer.cfg.in filename = instance-balancer.cfg.in
......
...@@ -2,7 +2,9 @@ ...@@ -2,7 +2,9 @@
{% set next_port = itertools.count(slapparameter_dict['port-base']).next -%} {% set next_port = itertools.count(slapparameter_dict['port-base']).next -%}
{% set site_id = slapparameter_dict['site-id'] -%} {% set site_id = slapparameter_dict['site-id'] -%}
{% set zodb_dict = slapparameter_dict['zodb-dict'] -%} {% set zodb_dict = slapparameter_dict['zodb-dict'] -%}
{% set instance_index_list = range(slapparameter_dict['instance-count']) -%}
{% set node_id_base = slapparameter_dict['name'] -%} {% set node_id_base = slapparameter_dict['name'] -%}
{% set node_id_index_format = '-%%0%ii' % (len(str(instance_index_list[-1])), ) -%}
{% set part_list = [] -%} {% set part_list = [] -%}
{% set publish_list = [] -%} {% set publish_list = [] -%}
{% set longrequest_logger_base_path = buildout_directory ~ '/var/log/longrequest_logger_' -%} {% set longrequest_logger_base_path = buildout_directory ~ '/var/log/longrequest_logger_' -%}
...@@ -278,7 +280,7 @@ lock-file = ${directory:run}/{{ name }}.lock ...@@ -278,7 +280,7 @@ lock-file = ${directory:run}/{{ name }}.lock
port = {{ port }} port = {{ port }}
event-log = ${directory:log}/{{ name }}-event.log event-log = ${directory:log}/{{ name }}-event.log
z2-log = ${directory:log}/{{ name }}-Z2.log z2-log = ${directory:log}/{{ name }}-Z2.log
node-id = {{ dumps(node_id_base ~ '-' ~ index) }} node-id = {{ dumps(node_id_base ~ (node_id_index_format % index)) }}
{% set log_list = [] -%} {% set log_list = [] -%}
{% set import_set = set() -%} {% set import_set = set() -%}
{% for db_name, zodb in zodb_dict.iteritems() -%} {% for db_name, zodb in zodb_dict.iteritems() -%}
...@@ -354,7 +356,7 @@ log = {{ '${' ~ conf_parameter_name ~ ':event-log}' }} {{ '${' ~ conf_parameter_ ...@@ -354,7 +356,7 @@ log = {{ '${' ~ conf_parameter_name ~ ':event-log}' }} {{ '${' ~ conf_parameter_
post = test ! -s {{ '${' ~ conf_parameter_name ~ ':pid-file}' }} || {{ bin_directory }}/slapos-kill --pidfile {{ '${' ~ conf_parameter_name ~ ':pid-file}' }} -s USR2 post = test ! -s {{ '${' ~ conf_parameter_name ~ ':pid-file}' }} || {{ bin_directory }}/slapos-kill --pidfile {{ '${' ~ conf_parameter_name ~ ':pid-file}' }} -s USR2
{% endmacro -%} {% endmacro -%}
{% for i in range(slapparameter_dict['instance-count']) -%} {% for i in instance_index_list -%}
{{ zope( {{ zope(
i, i,
next_port(), next_port(),
......
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