From 36e28d2d364c3215357fd14b2dbc0c53f85b7944 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/777562 Closes-Bug: 1915700 (cherry picked from commit 5250e6d595c7ad97059930809fbeda9b17c1b364) (cherry picked from commit 1b57684556ae9e61a3088c1cd63db3f0adfb895c) --- 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 72e44cae5f..e855e9a843 100644 --- a/deployment/ceph-ansible/ceph-base.yaml +++ b/deployment/ceph-ansible/ceph-base.yaml @@ -748,6 +748,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"]