mirror of https://github.com/ceph/ceph-ansible.git
config: Always use osd_memory_target if set
The osd_memory_target variable was only used if it was higher than the
calculated value based on the number of OSDs. This is changed to always
use the value if it is set in the configuration. This allows this value
to be intentionally set lower so that it does not have to be changed
when more OSDs are added later.
Signed-off-by: Gaudenz Steinlin <gaudenz.steinlin@cloudscale.ch>
(cherry picked from commit 4d1fdd2b05
)
pull/6034/head
parent
2ea3db269e
commit
0f679e7b20
|
@ -372,10 +372,12 @@ dummy:
|
||||||
|
|
||||||
## OSD options
|
## OSD options
|
||||||
#
|
#
|
||||||
|
# Variables to calculate a suitable osd_memory_target based on the number of OSDs
|
||||||
#is_hci: false
|
#is_hci: false
|
||||||
#hci_safety_factor: 0.2
|
#hci_safety_factor: 0.2
|
||||||
#non_hci_safety_factor: 0.7
|
#non_hci_safety_factor: 0.7
|
||||||
#osd_memory_target: 4294967296
|
# You can also set an explicit value which will override the calculation if set.
|
||||||
|
# osd_memory_target: 4294967296
|
||||||
#journal_size: 5120 # OSD journal size in MB
|
#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'.
|
#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
|
#public_network: 0.0.0.0/0
|
||||||
|
|
|
@ -372,10 +372,12 @@ ceph_iscsi_config_dev: false
|
||||||
|
|
||||||
## OSD options
|
## OSD options
|
||||||
#
|
#
|
||||||
|
# Variables to calculate a suitable osd_memory_target based on the number of OSDs
|
||||||
#is_hci: false
|
#is_hci: false
|
||||||
#hci_safety_factor: 0.2
|
#hci_safety_factor: 0.2
|
||||||
#non_hci_safety_factor: 0.7
|
#non_hci_safety_factor: 0.7
|
||||||
#osd_memory_target: 4294967296
|
# You can also set an explicit value which will override the calculation if set.
|
||||||
|
# osd_memory_target: 4294967296
|
||||||
#journal_size: 5120 # OSD journal size in MB
|
#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'.
|
#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
|
#public_network: 0.0.0.0/0
|
||||||
|
|
|
@ -90,20 +90,18 @@ filestore xattr use omap = true
|
||||||
{% if osd_objectstore == 'bluestore' %}
|
{% if osd_objectstore == 'bluestore' %}
|
||||||
{% set _num_osds = num_osds | default(0) | int %}
|
{% set _num_osds = num_osds | default(0) | int %}
|
||||||
[osd]
|
[osd]
|
||||||
{% if is_hci and _num_osds > 0 %}
|
{% if is_hci | bool and _num_osds > 0 and not osd_memory_target is defined %}
|
||||||
{# hci_safety_factor is the safety factor for HCI deployments #}
|
{# hci_safety_factor is the safety factor for HCI deployments #}
|
||||||
{% if ansible_memtotal_mb * 1048576 * hci_safety_factor / _num_osds > osd_memory_target %}
|
|
||||||
{% set _osd_memory_target = (ansible_memtotal_mb * 1048576 * hci_safety_factor / _num_osds) | int %}
|
{% set _osd_memory_target = (ansible_memtotal_mb * 1048576 * hci_safety_factor / _num_osds) | int %}
|
||||||
{% endif %}
|
{% elif _num_osds > 0 and not osd_memory_target is defined %}
|
||||||
{% elif _num_osds > 0 %}
|
|
||||||
{# non_hci_safety_factor is the safety factor for dedicated nodes #}
|
{# non_hci_safety_factor is the safety factor for dedicated nodes #}
|
||||||
{% if ansible_memtotal_mb * 1048576 * non_hci_safety_factor / _num_osds > osd_memory_target %}
|
|
||||||
{% set _osd_memory_target = (ansible_memtotal_mb * 1048576 * non_hci_safety_factor / _num_osds) | int %}
|
{% set _osd_memory_target = (ansible_memtotal_mb * 1048576 * non_hci_safety_factor / _num_osds) | int %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% if _osd_memory_target is defined or osd_memory_target is defined %}
|
||||||
osd memory target = {{ _osd_memory_target | default(osd_memory_target) }}
|
osd memory target = {{ _osd_memory_target | default(osd_memory_target) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% if inventory_hostname in groups.get(rgw_group_name, []) %}
|
{% if inventory_hostname in groups.get(rgw_group_name, []) %}
|
||||||
{% set _rgw_hostname = hostvars[inventory_hostname]['rgw_hostname'] | default(hostvars[inventory_hostname]['ansible_hostname']) %}
|
{% set _rgw_hostname = hostvars[inventory_hostname]['rgw_hostname'] | default(hostvars[inventory_hostname]['ansible_hostname']) %}
|
||||||
|
|
|
@ -364,10 +364,12 @@ cephfs_pools:
|
||||||
|
|
||||||
## OSD options
|
## OSD options
|
||||||
#
|
#
|
||||||
|
# Variables to calculate a suitable osd_memory_target based on the number of OSDs
|
||||||
is_hci: false
|
is_hci: false
|
||||||
hci_safety_factor: 0.2
|
hci_safety_factor: 0.2
|
||||||
non_hci_safety_factor: 0.7
|
non_hci_safety_factor: 0.7
|
||||||
osd_memory_target: 4294967296
|
# You can also set an explicit value which will override the calculation if set.
|
||||||
|
# osd_memory_target: 4294967296
|
||||||
journal_size: 5120 # OSD journal size in MB
|
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'.
|
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
|
public_network: 0.0.0.0/0
|
||||||
|
|
Loading…
Reference in New Issue