From 09908f92eea74f2a0eebbbee62d444a670e151a7 Mon Sep 17 00:00:00 2001 From: Giulio Fidente Date: Fri, 5 Jun 2020 13:39:08 +0200 Subject: [PATCH] Allow triggering ceph-ansible filestore-to-bluestore with ceph_fstobs tag This is useful to launch the filestore to bluestore migration playbook [1] on a "stable" overcloud using a command like: $ openstack overcloud external-upgrade run --tags ceph_fstobs \ -e ceph_ansible_limit=##nodeX### \ | tee oc-fstobs.log 1. https://github.com/ceph/ceph-ansible/blob/master/infrastructure-playbooks/filestore-to-bluestore.yml Change-Id: I2d68da9100ec0beb857498366973d910bca75cef (cherry picked from commit 1fdfe54ccf2a17fa74fa45c8c93830772c1fcd2c) --- deployment/ceph-ansible/ceph-base.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/deployment/ceph-ansible/ceph-base.yaml b/deployment/ceph-ansible/ceph-base.yaml index d7ebe84a3a..803ac500ae 100644 --- a/deployment/ceph-ansible/ceph-base.yaml +++ b/deployment/ceph-ansible/ceph-base.yaml @@ -588,6 +588,7 @@ outputs: tags: - ceph - ceph_systemd + - ceph_fstobs block: - name: ensure ceph-ansible is installed include_role: @@ -655,6 +656,7 @@ outputs: tags: - ceph - ceph_systemd + - ceph_fstobs block: - name: set ceph-ansible facts set_fact: @@ -707,6 +709,18 @@ outputs: - name: set ceph_ansible_playbooks_default set_fact: ceph_ansible_playbooks_default: ["/usr/share/ceph-ansible/infrastructure-playbooks/docker-to-podman.yml"] + - when: step|int == 0 + tags: + - never + - ceph_fstobs + block: + - name: stop if _limit is unset + 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: set ceph_ansible_playbooks_default + set_fact: + ceph_ansible_playbooks_default: ["/usr/share/ceph-ansible/infrastructure-playbooks/filestore-to-bluestore.yml"] - when: step|int == 0 tags: ceph block: