diff --git a/group_vars/all.yml.sample b/group_vars/all.yml.sample index 48f12423b..515469de7 100644 --- a/group_vars/all.yml.sample +++ b/group_vars/all.yml.sample @@ -360,7 +360,7 @@ dummy: #is_hci: false #hci_safety_factor: 0.2 #non_hci_safety_factor: 0.7 -#osd_memory_target: 4000000000 +#osd_memory_target: 4294967296 #journal_size: 5120 # OSD journal size in MB #block_db_size: -1 # block db size in bytes for the ceph-volume lvm batch. -1 means use the default of 'as big as possible'. #public_network: 0.0.0.0/0 diff --git a/group_vars/rhcs.yml.sample b/group_vars/rhcs.yml.sample index 14f85f26d..ba3b529dc 100644 --- a/group_vars/rhcs.yml.sample +++ b/group_vars/rhcs.yml.sample @@ -360,7 +360,7 @@ ceph_rhcs_version: 3 #is_hci: false #hci_safety_factor: 0.2 #non_hci_safety_factor: 0.7 -#osd_memory_target: 4000000000 +#osd_memory_target: 4294967296 #journal_size: 5120 # OSD journal size in MB #block_db_size: -1 # block db size in bytes for the ceph-volume lvm batch. -1 means use the default of 'as big as possible'. #public_network: 0.0.0.0/0 diff --git a/roles/ceph-config/templates/ceph.conf.j2 b/roles/ceph-config/templates/ceph.conf.j2 index 022fe6fc5..826dbe65a 100644 --- a/roles/ceph-config/templates/ceph.conf.j2 +++ b/roles/ceph-config/templates/ceph.conf.j2 @@ -89,12 +89,12 @@ filestore xattr use omap = true {% set _num_osds = num_osds | default(0) | int %} [osd] {% if is_hci and _num_osds > 0 %} -{% if ansible_memtotal_mb * hci_safety_factor / _num_osds > osd_memory_target %} # hci_safety_factor is the safety factor for HCI deployments -{% set _osd_memory_target = (ansible_memtotal_mb * hci_safety_factor / _num_osds) %} +{% if ansible_memtotal_mb * 1048576 * hci_safety_factor / _num_osds > osd_memory_target %} # hci_safety_factor is the safety factor for HCI deployments +{% set _osd_memory_target = (ansible_memtotal_mb * 1048576 * hci_safety_factor / _num_osds) %} {% endif %} {% elif _num_osds > 0 %} -{% if ansible_memtotal_mb * non_hci_safety_factor / _num_osds > osd_memory_target %} # non_hci_safety_factor is the safety factor for dedicated nodes -{% set _osd_memory_target = (ansible_memtotal_mb * non_hci_safety_factor / _num_osds) %} +{% if ansible_memtotal_mb * 1048576 * non_hci_safety_factor / _num_osds > osd_memory_target %} # non_hci_safety_factor is the safety factor for dedicated nodes +{% set _osd_memory_target = (ansible_memtotal_mb * 1048576 * non_hci_safety_factor / _num_osds) %} {% endif %} {% endif %} osd memory target = {{ _osd_memory_target | default(osd_memory_target) }} diff --git a/roles/ceph-defaults/defaults/main.yml b/roles/ceph-defaults/defaults/main.yml index fe365e59c..ab24cc74b 100644 --- a/roles/ceph-defaults/defaults/main.yml +++ b/roles/ceph-defaults/defaults/main.yml @@ -352,7 +352,7 @@ cephfs_pools: is_hci: false hci_safety_factor: 0.2 non_hci_safety_factor: 0.7 -osd_memory_target: 4000000000 +osd_memory_target: 4294967296 journal_size: 5120 # OSD journal size in MB block_db_size: -1 # block db size in bytes for the ceph-volume lvm batch. -1 means use the default of 'as big as possible'. public_network: 0.0.0.0/0