From 5babc1b4eb9ba7c2cd9ae05e345a7fd8d383f1dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Mon, 21 Jan 2019 12:08:56 +0100 Subject: [PATCH] mon: enable msgr2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- roles/ceph-config/templates/ceph.conf.j2 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/roles/ceph-config/templates/ceph.conf.j2 b/roles/ceph-config/templates/ceph.conf.j2 index b73361b75..4c163a508 100644 --- a/roles/ceph-config/templates/ceph.conf.j2 +++ b/roles/ceph-config/templates/ceph.conf.j2 @@ -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, []) %}