Skip to content

Commit

Permalink
config: do not always set _osd_memory_target
Browse files Browse the repository at this point in the history
When 'osd_memory_target' is overridden in ceph_conf_overrides.
The task that sets the fact `osd_memory_target` in the ceph-config role
should be skipped.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2056675#c11

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit e2076e4)
  • Loading branch information
guits committed Aug 8, 2022
1 parent e30fdeb commit 2e09456
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions roles/ceph-config/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@
set_fact:
_osd_memory_target: "{{ ((ansible_facts['memtotal_mb'] * 1048576 * safety_factor | float) / num_osds | float) | int }}"
when:
- not ceph_conf_overrides.get('osd', {}).get('osd_memory_target')
- not ceph_conf_overrides.get('osd', {}).get('osd memory target')
- num_osds | default(0) | int > 0
- ((ansible_facts['memtotal_mb'] * 1048576 * safety_factor | float) / num_osds | float) > osd_memory_target

Expand Down

0 comments on commit 2e09456

Please sign in to comment.