From 1b424ad5e9da6c79fd66b467b43af036f0c28e76 Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Mon, 1 Feb 2021 16:51:07 +0100 Subject: [PATCH] purge: zap and destroy db and wal devices for lvm batch 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 (cherry picked from commit 984191ac7fc7c500de3a7a111564a537b937711b) --- infrastructure-playbooks/purge-cluster.yml | 15 +++++++-------- .../purge-container-cluster.yml | 6 ++++-- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/infrastructure-playbooks/purge-cluster.yml b/infrastructure-playbooks/purge-cluster.yml index 6865c3765..10a1353c0 100644 --- a/infrastructure-playbooks/purge-cluster.yml +++ b/infrastructure-playbooks/purge-cluster.yml @@ -512,10 +512,8 @@ 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: @@ -523,10 +521,11 @@ 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: | diff --git a/infrastructure-playbooks/purge-container-cluster.yml b/infrastructure-playbooks/purge-container-cluster.yml index 8005970a7..c7bdc6235 100644 --- a/infrastructure-playbooks/purge-container-cluster.yml +++ b/infrastructure-playbooks/purge-container-cluster.yml @@ -317,8 +317,10 @@ 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: