Skip to content
Snippets Groups Projects
Commit 8952a382 authored by ale's avatar ale
Browse files

Do not automatically restore sharded datasets

In the case of partitioned datasets, the application layer is
responsible for data management, not float.
parent b32f4195
No related merge requests found
...@@ -495,6 +495,12 @@ attribute. ...@@ -495,6 +495,12 @@ attribute.
*master_election* attribute is also true, the backup job will only be *master_election* attribute is also true, the backup job will only be
run on the master host for the service. run on the master host for the service.
`sharded`: When this attribute is true, the dataset is considered a
sharded (partitioned) dataset, so float will **not** automatically
attempt to restore it on new servers: the idea is that for sharded
datasets, the application layer is responsible for data management.
This attribute is false by default.
`owner`: For filesystem paths, the user that will own the files upon `owner`: For filesystem paths, the user that will own the files upon
restore. restore.
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
dataset_owner: "{{ item.1.get('owner', '') }}" dataset_owner: "{{ item.1.get('owner', '') }}"
dataset_path: "{{ item.1.get('path', '') }}" dataset_path: "{{ item.1.get('path', '') }}"
dataset_type: "{% if 'backup_command' in item.1 %}pipe{% else %}file{% endif %}" dataset_type: "{% if 'backup_command' in item.1 %}pipe{% else %}file{% endif %}"
dataset_should_backup: "{{ item.0.name in float_enabled_services and ((not item.1.get('on_master_only', False)) or (item.0.get('master_host') == inventory_hostname)) }}" dataset_should_backup: "{{ (item.0.name in float_enabled_services) and (not item.1.get('sharded', False)) and ((not item.1.get('on_master_only', False)) or (item.0.get('master_host') == inventory_hostname)) }}"
- name: Set up configuration for dataset {{ dataset.name }} (source) - name: Set up configuration for dataset {{ dataset.name }} (source)
template: template:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment