update: enable msgr2 protocol

This commit enable the msgr2 protocol when the cluster is fully upgraded
to nautilus

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
pull/3748/head
Guillaume Abrioux 2019-03-20 13:22:46 +01:00 committed by Dimitri Savineau
parent ef096dd021
commit afdaa70a63
2 changed files with 25 additions and 0 deletions

View File

@ -797,6 +797,27 @@
name: ceph-client name: ceph-client
- name: container | enable msgr2 protocol
command: "{{ container_binary }} exec ceph-mon-{{ hostvars[groups[mon_group_name][0]]['ansible_hostname'] }} ceph mon enable-msgr2"
delegate_to: "{{ groups[mon_group_name][0] }}"
run_once: True
when: containerized_deployment
- name: non container | enable msgr2 protocol
command: ceph mon enable-msgr2
delegate_to: "{{ groups[mon_group_name][0] }}"
run_once: True
when: not containerized_deployment
- import_role:
name: ceph-handler
- name: import_role ceph-config
import_role:
name: ceph-config
vars:
msgr2_migration: True
- name: show ceph status - name: show ceph status
hosts: hosts:
- "{{ mon_group_name|default('mons') }}" - "{{ mon_group_name|default('mons') }}"

View File

@ -47,7 +47,11 @@ mon cluster log file = /dev/null
{% endif %} {% endif %}
mon host = {% if nb_mon > 0 %} mon host = {% if nb_mon > 0 %}
{% for host in _monitor_addresses -%} {% 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 }}] [{{ "v2:" + host.addr + mon_host_v2_suffix }},{{ "v1:" + host.addr + mon_host_v1_suffix }}]
{%- else -%}
{{ host.addr }}
{%- endif %}
{%- if not loop.last -%},{%- endif %} {%- if not loop.last -%},{%- endif %}
{%- endfor %} {%- endfor %}
{% elif nb_mon == 0 and inventory_hostname in groups.get(client_group_name, []) %} {% elif nb_mon == 0 and inventory_hostname in groups.get(client_group_name, []) %}