From a14a3e56c06a46f4147d1a03b6930f3a1217c85a Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Fri, 9 Jul 2021 16:29:09 +0200 Subject: [PATCH] update: fail the playbook if straw2 conversion failed It's better to fail the playbook so the user is aware the straw2 migration has failed. Signed-off-by: Guillaume Abrioux (cherry picked from commit c396122ad9acda19462c7da363696e174b8162d1) --- infrastructure-playbooks/rolling_update.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/infrastructure-playbooks/rolling_update.yml b/infrastructure-playbooks/rolling_update.yml index 1d6a29402..cfae16ceb 100644 --- a/infrastructure-playbooks/rolling_update.yml +++ b/infrastructure-playbooks/rolling_update.yml @@ -1094,12 +1094,16 @@ command: "{{ ceph_cmd }} --cluster {{ cluster }} osd setcrushmap -i /etc/ceph/{{ cluster }}-crushmap" changed_when: false - - name: switching to straw2 buckets failed - debug: + - name: inform that the switch to straw2 buckets failed + fail: msg: > "An attempt to switch to straw2 bucket was made but failed. Check the cluster status." + - name: remove crushmap backup + file: + path: /etc/ceph/{{ cluster }}-crushmap + state: absent - name: show ceph status hosts: "{{ mon_group_name|default('mons') }}"