Commit 7731726a authored by Vincent Pelletier's avatar Vincent Pelletier

[erp5:cluster] Make it easier to use tidstorage-dict parameter.

parent 5927abee
...@@ -99,20 +99,23 @@ value (dict) ...@@ -99,20 +99,23 @@ value (dict)
'tidstorage-dict' (dict, optional) 'tidstorage-dict' (dict, optional)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Backup parameters for tidstorage-related backup scripts. Backup parameters for tidstorage-related backup scripts.
No backups are done if not provided. TIDStorage is not deployed if not provided.
key (str) key (str)
Possible keys and associated value types: Possible keys and associated value types:
'zodb-dict' (dict, mandatory) 'zodb-dict' (dict, optional)
key (str) key (str)
(same as zodb-dict) (same as zodb-dict)
value (str, optional) value (str, optional)
Path to store backups of this zodb into. Occurrences of '%(backup)s' are Path to store backups of this zodb into. Occurrences of '%(backup)s' are
replaced with the path to partition's srv/backup/zodb directory. replaced with the path to partition's srv/backup/zodb directory.
Defaults to {}.
If an item is missing compared to zodb-dict, value defaults to If an item is missing compared to zodb-dict, value defaults to
'%(backup)s/' + key. '%(backup)s/' + key.
'timestamp-path' (str, optional) 'timestamp-path' (str, optional)
Path to backup timestamp file. Path to backup timestamp file.
Defaults to Occurrences of '%(backup)s' are replaced with the path to partition's
srv/backup/tidstorage directory.
Defaults to '%(backup)s/repozo_tidstorage_timestamp.log'.
'zope-partition-dict' (dict, optional) 'zope-partition-dict' (dict, optional)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
......
...@@ -298,7 +298,7 @@ mode = 640 ...@@ -298,7 +298,7 @@ mode = 640
[template-zeo] [template-zeo]
recipe = slapos.recipe.build:download recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/instance-zeo.cfg.in url = ${:_profile_base_location_}/instance-zeo.cfg.in
md5sum = 04b850a8da2a9acd338f9109e78de7ce md5sum = 70425735822e029a7ebd1008903c673b
mode = 640 mode = 640
[template-cluster-zope] [template-cluster-zope]
......
...@@ -62,11 +62,11 @@ ipv6 = {{ ipv6 }} ...@@ -62,11 +62,11 @@ ipv6 = {{ ipv6 }}
cache_size, cache_size,
client_dict, client_dict,
]) -%} ]) -%}
{% if tidstorage_dict -%} {% if tidstorage_dict is not None -%}
{% do known_tid_storage_identifier_dict.__setitem__( {% do known_tid_storage_identifier_dict.__setitem__(
(known_tid_storage_identifier_host, export_id), ( (known_tid_storage_identifier_host, export_id), (
storage_dict['path'], storage_dict['path'],
tidstorage_dict.get(export_id, '%(backup)s/' ~ export_id) % {'backup': zodb_backup_path}, tidstorage_dict.get('zodb-dict', {}).get(export_id, '%(backup)s/' ~ export_id) % {'backup': zodb_backup_path},
mount_point, mount_point,
), ),
) -%} ) -%}
...@@ -109,7 +109,7 @@ path = ${directory:promises}/zeo-tunnel-{{ storage_family }} ...@@ -109,7 +109,7 @@ path = ${directory:promises}/zeo-tunnel-{{ storage_family }}
{% set next_port = next_port + 1 -%} {% set next_port = next_port + 1 -%}
{% endfor -%} {% endfor -%}
{% if tidstorage_dict -%} {% if tidstorage_dict is not None -%}
[tidstorage] [tidstorage]
recipe = slapos.cookbook:tidstorage recipe = slapos.cookbook:tidstorage
known-tid-storage-identifier-dict = {{ dumps(known_tid_storage_identifier_dict) }} known-tid-storage-identifier-dict = {{ dumps(known_tid_storage_identifier_dict) }}
......
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