]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
purge: zap and destroy db and wal devices for lvm batch
authorGuillaume Abrioux <gabrioux@redhat.com>
Mon, 1 Feb 2021 15:51:07 +0000 (16:51 +0100)
committerGuillaume Abrioux <gabrioux@redhat.com>
Thu, 11 Mar 2021 12:51:38 +0000 (13:51 +0100)
Those devices (db/wal) are never zapped in lvm batch deployment.
Iterating over `dedicated_devices` and `bluestore_wal_devices` fixes
this issue.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1922926
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 984191ac7fc7c500de3a7a111564a537b937711b)

infrastructure-playbooks/purge-cluster.yml
infrastructure-playbooks/purge-container-cluster.yml

index 6865c37655ceb24b280a66ec6e822ab3da288616..10a1353c074c368cc110d8436f0f59f51db4c2f3 100644 (file)
       action: "zap"
     environment:
       CEPH_VOLUME_DEBUG: "{{ ceph_volume_debug }}"
-    with_items: "{{ lvm_volumes }}"
-    when:
-      - lvm_volumes | default([]) | length > 0
-      - ceph_volume_present.rc == 0
+    with_items: "{{ lvm_volumes | default([]) }}"
+    when: ceph_volume_present.rc == 0
 
   - name: zap and destroy osds created by ceph-volume with devices
     ceph_volume:
       action: "zap"
     environment:
       CEPH_VOLUME_DEBUG: "{{ ceph_volume_debug }}"
-    with_items: "{{ devices | default([]) }}"
-    when:
-      - devices | default([]) | length > 0
-      - ceph_volume_present.rc == 0
+    with_items:
+      - "{{ devices | default([]) }}"
+      - "{{ dedicated_devices | default([]) }}"
+      - "{{ bluestore_wal_devices | default([]) }}"
+    when: ceph_volume_present.rc == 0
 
   - name: get ceph block partitions
     shell: |
index 8005970a7329f13639c3b668a90ae553661d78bf..c7bdc6235ddc816887b66bafee2a9f8efd16c848 100644 (file)
       CEPH_VOLUME_DEBUG: "{{ ceph_volume_debug }}"
       CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}"
       CEPH_CONTAINER_BINARY: "{{ container_binary }}"
-    with_items: "{{ devices | default([]) }}"
-    when: devices | default([]) | length > 0
+    with_items:
+      - "{{ devices | default([]) }}"
+      - "{{ dedicated_devices | default([]) }}"
+      - "{{ bluestore_wal_devices | default([]) }}"
 
   - name: remove ceph osd service
     file: