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 <gabrioux@redhat.com>
(cherry picked from commit c396122ad9)
pull/6709/head
Guillaume Abrioux 2021-07-09 16:29:09 +02:00 committed by Dimitri Savineau
parent e0b6bb96ec
commit bf5d0b7374
1 changed files with 6 additions and 2 deletions

View File

@ -1082,12 +1082,16 @@
command: "{{ ceph_cmd }} --cluster {{ cluster }} osd setcrushmap -i /etc/ceph/{{ cluster }}-crushmap" command: "{{ ceph_cmd }} --cluster {{ cluster }} osd setcrushmap -i /etc/ceph/{{ cluster }}-crushmap"
changed_when: false changed_when: false
- name: switching to straw2 buckets failed - name: inform that the switch to straw2 buckets failed
debug: fail:
msg: > msg: >
"An attempt to switch to straw2 bucket was made but failed. "An attempt to switch to straw2 bucket was made but failed.
Check the cluster status." Check the cluster status."
- name: remove crushmap backup
file:
path: /etc/ceph/{{ cluster }}-crushmap
state: absent
- name: show ceph status - name: show ceph status
hosts: "{{ mon_group_name|default('mons') }}" hosts: "{{ mon_group_name|default('mons') }}"