From 5250e6d595c7ad97059930809fbeda9b17c1b364 Mon Sep 17 00:00:00 2001 From: Giulio Fidente Date: Mon, 15 Feb 2021 12:01:14 +0100 Subject: [PATCH] Check Ceph cluster healthy state before starting FS to BS playbook The Ceph OSDs migration from filestore to bluestore should only be attempted if the cluster is in HEALTH_OK state because during the process OSDs will be destroyed and recreated. This change adds a check to poll for the cluster status before the playbook is triggered. Change-Id: Ib9c90c4c2e838bed461ac63139b161ab689d28cf Depends-On: https://review.opendev.org/775669 Closes-Bug: 1915700 --- deployment/ceph-ansible/ceph-base.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/deployment/ceph-ansible/ceph-base.yaml b/deployment/ceph-ansible/ceph-base.yaml index a9f121b0c2..86f5175741 100644 --- a/deployment/ceph-ansible/ceph-base.yaml +++ b/deployment/ceph-ansible/ceph-base.yaml @@ -764,6 +764,17 @@ outputs: fail: msg: The ceph-ansible filestore to bluestore playbook limit is not set; please use -e ceph_ansible_limit=##nodename## when: (ceph_ansible_limit is not defined) or (ceph_ansible_limit|length == 0) + - name: ensure ceph health is OK before proceeding + import_role: + role: ceph + tasks_from: ceph-health + vars: + fail_on_ceph_health_err: true + fail_on_ceph_health_warn: true + osd_percentage_min: 0 + tripleo_delegate_to: "{{ groups['ceph_mon'] | default([]) }}" + tags: + - ceph_health - name: set ceph_ansible_playbooks_default set_fact: ceph_ansible_playbooks_default: ["/usr/share/ceph-ansible/infrastructure-playbooks/filestore-to-bluestore.yml"]