From fd58e99deca5efc10c30e9e62605bc9e1e0ec5e4 Mon Sep 17 00:00:00 2001 From: Giulio Fidente Date: Tue, 2 Feb 2021 00:24:16 +0100 Subject: [PATCH] Enforces minimum Ceph client version to Mimic This is so that we can take advantage of the deferred deletion feature in Cinder. Change-Id: I4c3d8fee6c7a0c25cca4d1e6b731060684cd28b3 Closes-Bug: 1914124 (cherry picked from commit 8d962f136275d8f73f559a0bbfa99b5b2160c886) --- deployment/ceph-ansible/ceph-mon.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/deployment/ceph-ansible/ceph-mon.yaml b/deployment/ceph-ansible/ceph-mon.yaml index c893af1239..00fe98cbbe 100644 --- a/deployment/ceph-ansible/ceph-mon.yaml +++ b/deployment/ceph-ansible/ceph-mon.yaml @@ -108,5 +108,22 @@ outputs: copy: dest: "{{playbook_dir}}/ceph-ansible/group_vars/mons.yml" content: "{{ceph_ansible_group_vars_mons|to_nice_yaml}}" + - - name: ceph_base_external_deploy_finish + # NOTE(gfidente): enforce minimum client version to mimic to use RBD clone v2 with Cinder + when: step|int == 3 + become: true + tags: + - ceph + block: + - name: Get ceph-mon container ID + # Supposed to work with cephadm and ceph-ansible formats + # ceph-4b5c8c0a-ff60-454b-a1b4-9747aa737d19-mon.standalone.localdomain + # ceph-mon-standalone + command: "{{ container_cli }} ps -q -f 'name=ceph-?(.*)-mon.*'" + register: ceph_mon_id + delegate_to: "{{ groups['ceph_mon'][0] }}" + - name: Enforce minimum Ceph clients version to Mimic + command: "{{ container_cli }} exec {{ ceph_mon_id.stdout_lines[0] }} ceph osd set-require-min-compat-client mimic" + delegate_to: "{{ groups['ceph_mon'][0] }}" external_update_tasks: {get_attr: [CephBase, role_data, external_update_tasks]} external_upgrade_tasks: {get_attr: [CephBase, role_data, external_upgrade_tasks]}