
This allows alternate algorithms to be developed and enables the same tasks to be included in a test to verify the planned retention does not exceed the cluster storage capacity. Change-Id: Ie3d80d6cfad16b946ccd790859bc7cd92b90fdef
25 lines
1.2 KiB
YAML
25 lines
1.2 KiB
YAML
---
|
|
|
|
- name: Set assumed buffer storage fact
|
|
set_fact:
|
|
es_assumed_buffer_storage: "{{ ((es_total_available_storage | int) * 0.25) | round | int }}"
|
|
|
|
- name: Set usable buffer storage fact(s)
|
|
set_fact:
|
|
es_usable_buffer_storage: "{{ (es_total_available_storage | int) - (es_assumed_buffer_storage | int) }}"
|
|
es_expected_storage: "{{ ((elastic_beat_retention_policy_hosts.values() | map('int') | list) | sum) * (elastic_beat_storage_constant | int) }}"
|
|
|
|
- name: Set buffer storage fact
|
|
set_fact:
|
|
es_assumed_usable_storage_per_node: "{{ (es_usable_buffer_storage | int) // (data_nodes | length | int) }}"
|
|
|
|
- name: Set storage the mulitplier
|
|
set_fact:
|
|
es_storage_multiplier: "{{ ((es_usable_buffer_storage | int) < (es_expected_storage | int)) | ternary(((elastic_beat_storage_constant | int) * 2), elastic_beat_storage_constant | int) }}"
|
|
|
|
- name: Set retention facts
|
|
set_fact: "elastic_{{ item.key }}_retention={{ (es_assumed_usable_storage_per_node | int) // ((item.value | int) * (es_storage_multiplier | int)) }}"
|
|
when:
|
|
- hostvars[inventory_hostname]["elastic_" + item.key + "_retention"] is undefined
|
|
with_dict: "{{ elastic_beat_retention_policy_hosts }}"
|