]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
update: enable msgr2 protocol
authorGuillaume Abrioux <gabrioux@redhat.com>
Wed, 20 Mar 2019 12:22:46 +0000 (13:22 +0100)
committerDimitri Savineau <savineau.dimitri@gmail.com>
Mon, 25 Mar 2019 20:02:56 +0000 (16:02 -0400)
This commit enable the msgr2 protocol when the cluster is fully upgraded
to nautilus

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
infrastructure-playbooks/rolling_update.yml
roles/ceph-config/templates/ceph.conf.j2

index 1b73866e019ccb51ce99247d285358efa579e7e7..f74b5ae8731ba2de75099a00ba520fdcae5a2bc4 100644 (file)
         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
   hosts:
     - "{{ mon_group_name|default('mons') }}"
index 2ce9afb32cc506523e29091174d403818cfe4690..be9789022e22582b8c30ca8733fb60f7cebef31f 100644 (file)
@@ -47,7 +47,11 @@ mon cluster log file = /dev/null
 {% 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 -%}
+{{ host.addr }}
+{%- endif %}
 {%- if not loop.last -%},{%- endif %}
 {%- endfor %}
 {% elif nb_mon == 0 and inventory_hostname in groups.get(client_group_name, []) %}