]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
mon: enable msgr2
authorSébastien Han <seb@redhat.com>
Mon, 21 Jan 2019 11:08:56 +0000 (12:08 +0100)
committerGuillaume Abrioux <gabrioux@redhat.com>
Tue, 22 Jan 2019 12:45:38 +0000 (13:45 +0100)
Enabling msgr2 style declaration for Nautilus and above. Prior releases
will keep the right syntax.
When upgrading from Mimic to Nautilus we must maintain something in the
form of:

mon_host = [v1:127.0.0.1:6789/0,v2:127.0.0.1:3300/0]

Signed-off-by: Sébastien Han <seb@redhat.com>
roles/ceph-config/templates/ceph.conf.j2

index b73361b7585dc01f07fa77fb36958923f5d90ce7..4c163a5087003280c3cf1778c759cc60f55e62ab 100644 (file)
@@ -37,9 +37,13 @@ fsid = {{ fsid }}
 log file = /dev/null
 mon cluster log file = /dev/null
 {% endif %}
+{% if ceph_release not in ['jewel', 'kraken', 'luminous', 'mimic'] %}
+{% set mon_host_v1_suffix = ":6789" %}
+{% set mon_host_v2_suffix = ":3300" %}
+{% endif %}
 mon host = {% if nb_mon > 0 %}
 {% for host in _monitor_addresses -%}
-{{ host.addr }}
+[{{ "v2:" + host.addr + mon_host_v2_suffix }},{{ "v1:" + host.addr + mon_host_v1_suffix }}]
 {%- if not loop.last -%},{%- endif %}
 {%- endfor %}
 {% elif nb_mon == 0 and inventory_hostname in groups.get(client_group_name, []) %}