mirror of https://github.com/ceph/ceph-ansible.git
ceph-config: fix overriding osd_memory_target
When the value is overriding in `ceph_conf_overrides`, there is no need to calculate and set `osd_memory_target` again as we wanted to override the conf by our desired value. Signed-off-by: Seena Fallah <seenafallah@gmail.com>pull/7333/head
parent
57b0890aff
commit
613773b2a3
|
@ -97,9 +97,9 @@
|
|||
- name: set osd related config facts
|
||||
when: inventory_hostname in groups.get(osd_group_name, [])
|
||||
block:
|
||||
- name: set_fact osd_memory_target, override from ceph_conf_overrides
|
||||
- name: set_fact _osd_memory_target, override from ceph_conf_overrides
|
||||
set_fact:
|
||||
osd_memory_target: "{{ item }}"
|
||||
_osd_memory_target: "{{ item }}"
|
||||
loop:
|
||||
- "{{ ceph_conf_overrides.get('osd', {}).get('osd memory target', '') }}"
|
||||
- "{{ ceph_conf_overrides.get('osd', {}).get('osd_memory_target', '') }}"
|
||||
|
@ -109,6 +109,7 @@
|
|||
set_fact:
|
||||
_osd_memory_target: "{{ ((ansible_facts['memtotal_mb'] * 1048576 * safety_factor | float) / num_osds | float) | int }}"
|
||||
when:
|
||||
- _osd_memory_target is undefined
|
||||
- num_osds | default(0) | int > 0
|
||||
- ((ansible_facts['memtotal_mb'] * 1048576 * safety_factor | float) / num_osds | float) > (osd_memory_target | float)
|
||||
|
||||
|
|
|
@ -80,7 +80,6 @@ filestore xattr use omap = true
|
|||
{% endif %}
|
||||
{% endif %}
|
||||
{% if osd_objectstore == 'bluestore' %}
|
||||
{% set _num_osds = num_osds | default(0) | int %}
|
||||
[osd]
|
||||
osd memory target = {{ _osd_memory_target | default(osd_memory_target) }}
|
||||
{% endif %}
|
||||
|
|
Loading…
Reference in New Issue