From 8d93007e56f9296f7273396438be002084a50b47 Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Thu, 29 Nov 2018 10:16:52 +0100 Subject: [PATCH] config: write jinja comment with appropriate syntax jinja comment should be written using the jinja syntax `{# ... #}` Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1654441 Signed-off-by: Guillaume Abrioux (cherry picked from commit a86c2b85263f84891e2cbf7e782f7ac8891257b3) --- roles/ceph-config/templates/ceph.conf.j2 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/roles/ceph-config/templates/ceph.conf.j2 b/roles/ceph-config/templates/ceph.conf.j2 index 837c5c5a8..3eb1b8b22 100644 --- a/roles/ceph-config/templates/ceph.conf.j2 +++ b/roles/ceph-config/templates/ceph.conf.j2 @@ -155,11 +155,13 @@ 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 * 1048576 * hci_safety_factor / _num_osds > osd_memory_target %} # 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 %} {% endif %} {% elif _num_osds > 0 %} -{% 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 +{# 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 %} {% endif %} {% endif %}