mirror of https://github.com/ceph/ceph-ansible.git
config: use osd_memory_target value from ceph_conf_overrides if defined
otherwise it's impossible to override `osd_memory_target` via `ceph_conf_overrides`. Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2056675 Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>pull/7293/head
parent
e2076e439b
commit
f19dcb266a
|
@ -98,12 +98,21 @@
|
||||||
when:
|
when:
|
||||||
- devices | default([]) | length > 0
|
- devices | default([]) | length > 0
|
||||||
|
|
||||||
|
- name: set_fact _osd_memory_target
|
||||||
|
set_fact:
|
||||||
|
_osd_memory_target: "{{ item }}"
|
||||||
|
loop:
|
||||||
|
- "{{ ceph_conf_overrides.get('osd', {}).get('osd memory target', '') }}"
|
||||||
|
- "{{ ceph_conf_overrides.get('osd', {}).get('osd_memory_target', '') }}"
|
||||||
|
when:
|
||||||
|
- item
|
||||||
|
- item > osd_memory_target
|
||||||
|
|
||||||
- name: set_fact _osd_memory_target
|
- name: set_fact _osd_memory_target
|
||||||
set_fact:
|
set_fact:
|
||||||
_osd_memory_target: "{{ ((ansible_facts['memtotal_mb'] * 1048576 * safety_factor | float) / num_osds | float) | int }}"
|
_osd_memory_target: "{{ ((ansible_facts['memtotal_mb'] * 1048576 * safety_factor | float) / num_osds | float) | int }}"
|
||||||
when:
|
when:
|
||||||
- not ceph_conf_overrides.get('osd', {}).get('osd_memory_target')
|
- _osd_memory_target is undefined
|
||||||
- not ceph_conf_overrides.get('osd', {}).get('osd memory target')
|
|
||||||
- num_osds | default(0) | int > 0
|
- num_osds | default(0) | int > 0
|
||||||
- ((ansible_facts['memtotal_mb'] * 1048576 * safety_factor | float) / num_osds | float) > osd_memory_target
|
- ((ansible_facts['memtotal_mb'] * 1048576 * safety_factor | float) / num_osds | float) > osd_memory_target
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue