951fb85373
This patch is version 1 (not tested) of adding erasure code support to swift. It adds the following: - Add policy_type, ec_type, ec_num_data_fragments, ec_num_parity_fragments and ec_object_segment_size to the policy definition. - Update the ring.contents.j2 to set replica count for the ring to ec_num_parity_fragments + ec_object_segment_size, if using the erasure code policy_type. - Adds extra EC options to swift.conf for EC policies. I may have missed something and again this hasn't been tested yet. NOTE: EC in Swift is strictly _BETA_ and shouldn't be run in production, however, we do need to test it! Change-Id: If2069a95e6ea92e34fb329cb6e0027188f15f0bb
35 lines
936 B
Django/Jinja
35 lines
936 B
Django/Jinja
# {{ ansible_managed }}
|
|
|
|
[swift-hash]
|
|
swift_hash_path_suffix = {{ swift_hash_path_suffix }}
|
|
swift_hash_path_prefix = {{ swift_hash_path_prefix }}
|
|
|
|
|
|
# Storage Policies
|
|
{% for policy in swift.storage_policies %}
|
|
{% set swift_policy_type = policy.policy.policy_type|default('replication') %}
|
|
|
|
[storage-policy:{{ policy.policy.index }}]
|
|
name = {{ policy.policy.name }}
|
|
policy_type = {{ swift_policy_type }}
|
|
|
|
{% if swift_policy_type == 'erasure_coding' %}
|
|
ec_type = {{ policy.policy.ec_type }}
|
|
ec_num_data_fragments = {{ policy.policy.ec_num_data_fragments }}
|
|
ec_num_parity_fragments = {{ policy.policy.ec_num_parity_fragments }}
|
|
ec_object_segment_size = {{ policy.policy.ec_object_segment_size }}
|
|
{% endif %}
|
|
|
|
{% if policy.policy.deprecated is defined %}
|
|
deprecated = {{ policy.policy.deprecated }}
|
|
{% endif %}
|
|
|
|
{% if policy.policy.default is defined %}
|
|
default = {{ policy.policy.default }}
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
|
|
|
|
|
[swift-constraints]
|