]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
update: fail the playbook if straw2 conversion failed
authorGuillaume Abrioux <gabrioux@redhat.com>
Fri, 9 Jul 2021 14:29:09 +0000 (16:29 +0200)
committerDimitri Savineau <savineau.dimitri@gmail.com>
Fri, 9 Jul 2021 20:32:47 +0000 (16:32 -0400)
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 c396122ad9acda19462c7da363696e174b8162d1)

infrastructure-playbooks/rolling_update.yml

index c6a3f3dcb6ac85ea727209103867eca25d8049c5..b65d5b935fd9820f0f195da80e19f1a58ce441dc 100644 (file)
           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') }}"