Commit de7b1dd4 authored by Julien Muchembled's avatar Julien Muchembled

erp5-cluster: fix instanciation when using custom location for tidstorage files

parent 303d1286
...@@ -197,9 +197,9 @@ ...@@ -197,9 +197,9 @@
"default": "daily", "default": "daily",
"type": "string" "type": "string"
}, },
"tidstorage-timestamp-path": { "tidstorage-repozo-path": {
"description": "Path to backup timestamp file, occurrences of '%(backup)s' being replaced with the path to partition's srv/backup/tidstorage directory", "description": "Directory for backup timestamp and tidstorage status files.",
"default": "%(backup)s/repozo_tidstorage_timestamp.log", "default": "~/srv/backup/tidstorage",
"type": "string" "type": "string"
} }
}, },
......
...@@ -301,7 +301,7 @@ md5sum = 1c27513d03c5dbb7c12f71386bc97ef7 ...@@ -301,7 +301,7 @@ md5sum = 1c27513d03c5dbb7c12f71386bc97ef7
[template-zeo] [template-zeo]
< = download-base < = download-base
filename = instance-zeo.cfg.in filename = instance-zeo.cfg.in
md5sum = cc91f5a4778153dc1d34398b9a80150d md5sum = 9670cf63099e2c520017a23defff51a4
[template-zope] [template-zope]
< = download-base < = download-base
......
{% set next_port = slapparameter_dict['tcpv4-port'] -%} {% set next_port = slapparameter_dict['tcpv4-port'] -%}
{% set ipv4 = (ipv4_set | list)[0] -%} {% set ipv4 = (ipv4_set | list)[0] -%}
{% set backup_periodicity = slapparameter_dict.get('backup-periodicity', 'daily') -%} {% set backup_periodicity = slapparameter_dict.get('backup-periodicity', 'daily') -%}
{% set default_tidstorage_timestamp_path = slapparameter_dict.get('tidstorage-timestamp-path', buildout_directory ~ '/srv/backup/tidstorage') -%}
{% set part_list = [] -%} {% set part_list = [] -%}
{% macro section(name) %}{% do part_list.append(name) %}{{ name }}{% endmacro -%} {% macro section(name) %}{% do part_list.append(name) %}{{ name }}{% endmacro -%}
{% set storage_dict = {} -%} {% set storage_dict = {} -%}
...@@ -69,6 +68,7 @@ path = ${directory:promises}/zeo-{{ family }} ...@@ -69,6 +68,7 @@ path = ${directory:promises}/zeo-{{ family }}
{% if backup_periodicity == 'never' -%} {% if backup_periodicity == 'never' -%}
{% set known_tid_storage_identifier_dict = () %} {% set known_tid_storage_identifier_dict = () %}
{% set tidstorage_repozo_path = '' -%}
{% else -%} {% else -%}
[tidstorage] [tidstorage]
recipe = slapos.cookbook:tidstorage recipe = slapos.cookbook:tidstorage
...@@ -76,11 +76,13 @@ known-tid-storage-identifier-dict = {{ dumps(known_tid_storage_identifier_dict) ...@@ -76,11 +76,13 @@ known-tid-storage-identifier-dict = {{ dumps(known_tid_storage_identifier_dict)
configuration-path = ${directory:etc}/tidstorage.py configuration-path = ${directory:etc}/tidstorage.py
ip = {{ ipv4 }} ip = {{ ipv4 }}
port = {{ tidstorage_port }} port = {{ tidstorage_port }}
timestamp-file-path = {{ dumps(slapparameter_dict.get('tidstorage-timestamp-path', '%(backup)s/repozo_tidstorage_timestamp.log') % {'backup': default_tidstorage_timestamp_path}) }} {% set tidstorage_repozo_path = slapparameter_dict.get('tidstorage-repozo-path', buildout_directory ~ '/srv/backup/tidstorage') -%}
timestamp-file-path = {{ tidstorage_repozo_path ~ '/repozo_tidstorage_timestamp.log' }}
{# BBB: recipe requires logfile-name for nothing because tidstorage runs in foreground mode -#} {# BBB: recipe requires logfile-name for nothing because tidstorage runs in foreground mode -#}
logfile-name = logfile-name =
pidfile-name = ${directory:run}/tidstorage.pid pidfile-name = ${directory:run}/tidstorage.pid
status-file = ${directory:tidstorage}/tidstorage.tid {# TODO: Add support for backup status file, so that the status file can be close to the ZODB (rather than close to the backup files). And do it efficiently, to not copy the whole status file every time. -#}
status-file = {{ tidstorage_repozo_path ~ '/tidstorage.tid' }}
tidstorage-repozo-binary = {{ bin_directory }}/tidstorage_repozo tidstorage-repozo-binary = {{ bin_directory }}/tidstorage_repozo
tidstoraged-binary = {{ bin_directory }}/tidstoraged tidstoraged-binary = {{ bin_directory }}/tidstoraged
repozo-binary = {{ bin_directory }}/repozo repozo-binary = {{ bin_directory }}/repozo
...@@ -181,7 +183,7 @@ log = ${:var}/log ...@@ -181,7 +183,7 @@ log = ${:var}/log
run = ${:var}/run run = ${:var}/run
backup-zodb = {{ default_backup_path }} backup-zodb = {{ default_backup_path }}
zodb = {{ default_zodb_path }} zodb = {{ default_zodb_path }}
tidstorage = {{ default_tidstorage_timestamp_path }} tidstorage = {{ tidstorage_repozo_path }}
[buildout] [buildout]
extends = {{ logrotate_cfg }} extends = {{ logrotate_cfg }}
......
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