]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
update: refact msgr2 migration
authorGuillaume Abrioux <gabrioux@redhat.com>
Tue, 16 Apr 2019 08:31:44 +0000 (10:31 +0200)
committerGuillaume Abrioux <gabrioux@redhat.com>
Thu, 18 Apr 2019 09:16:11 +0000 (11:16 +0200)
this commit refact the msgr2 protocol introduction.

If it's a fresh install, let's go with v2 only.
If we upgrade to nautilus, we should go with v2+v1 syntax to ensure
nothing breaks.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
group_vars/all.yml.sample
group_vars/rhcs.yml.sample
roles/ceph-config/templates/ceph.conf.j2
roles/ceph-defaults/defaults/main.yml

index 5b7258cc327405c77fd960f6cf0b00a85b7e0a40..99e4e4b2110ae28c8e9de3898f49cea7a5f2a810 100644 (file)
@@ -337,6 +337,12 @@ dummy:
 #ip_version: ipv4
 #mon_use_fqdn: false # if set to true, the MON name used will be the fqdn in the ceph.conf
 
+#mon_host_v1:
+#  enabled: True
+#  suffix: ':6789'
+#mon_host_v2:
+#  suffix: ':3300'
+
 ##########
 # CEPHFS #
 ##########
index ff62ab1ba1c8cd22ab63b9a1522802a3e8296b48..4dce4ae3fe60caf4ffaf43c9c8706e45db1cb5a5 100644 (file)
@@ -337,6 +337,12 @@ ceph_rhcs_version: 3
 #ip_version: ipv4
 #mon_use_fqdn: false # if set to true, the MON name used will be the fqdn in the ceph.conf
 
+#mon_host_v1:
+#  enabled: True
+#  suffix: ':6789'
+#mon_host_v2:
+#  suffix: ':3300'
+
 ##########
 # CEPHFS #
 ##########
index 88759a8fe48f3d9f7790890394c64ed19af6f672..f01fc108e1f525f1f41429c435ebe2bc4f8a6cc0 100644 (file)
@@ -41,16 +41,17 @@ 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 -%}
-{% if msgr2_migration | default(False) or not rolling_update %}
-[{{ "v2:" + host.addr + mon_host_v2_suffix }},{{ "v1:" + host.addr + mon_host_v1_suffix }}]
-{%- else -%}
+{% if msgr2_migration | default(False) %}
+[{{ "v2:" + host.addr + mon_host_v2.suffix }},{{ "v1:" + host.addr + mon_host_v1.suffix }}]
+{%- elif not msgr2_migration | default(False) and rolling_update -%}
 {{ host.addr }}
+{%- else -%}
+{% if mon_host_v1.enabled %}
+{% set _v1 = ',v1:' + host.addr + mon_host_v1.suffix %}
+{% endif %}
+[{{ "v2:" + host.addr + mon_host_v2.suffix }}{{ _v1 | default('') }}]
 {%- endif %}
 {%- if not loop.last -%},{%- endif %}
 {%- endfor %}
index 7688e0dc49107962a28f01ad1dc053b7c277a567..042e5549137842e6babc429d29c44f1e88fa6908 100644 (file)
@@ -329,6 +329,12 @@ monitor_address_block: subnet
 ip_version: ipv4
 mon_use_fqdn: false # if set to true, the MON name used will be the fqdn in the ceph.conf
 
+mon_host_v1:
+  enabled: True
+  suffix: ':6789'
+mon_host_v2:
+  suffix: ':3300'
+
 ##########
 # CEPHFS #
 ##########