Skip to content

Commit

Permalink
no lvs removal
Browse files Browse the repository at this point in the history
  • Loading branch information
aliakseimakarau committed Mar 28, 2024
1 parent 149424d commit 99e9246
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions roles/testnode/tasks/zap_disks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,22 +63,22 @@
- '"ram" not in item.key'
- '"sr" not in item.key'

- name: Remove all LVM data
shell: "dmsetup remove_all --force"
register: removed_lvm_data
until: "'Unable to remove' not in removed_lvm_data.stderr"
retries: 5
delay: 1
ignore_errors: true
# - name: Remove all LVM data
# shell: "dmsetup remove_all --force"
# register: removed_lvm_data
# until: "'Unable to remove' not in removed_lvm_data.stderr"
# retries: 5
# delay: 1
# ignore_errors: true

## See http://tracker.ceph.com/issues/21989
- name: Check for physical volumes
shell: "pvdisplay | grep 'PV Name' | awk '{ print $3 }'"
register: pvs_to_remove
# ## See http://tracker.ceph.com/issues/21989
# - name: Check for physical volumes
# shell: "pvdisplay | grep 'PV Name' | awk '{ print $3 }'"
# register: pvs_to_remove

- name: Remove physical volumes
shell: "pvremove --force --force --yes {{ item }}"
with_items: "{{ pvs_to_remove.stdout_lines }}"
when:
- pvs_to_remove is defined
- pvs_to_remove.stdout_lines|length > 0
# - name: Remove physical volumes
# shell: "pvremove --force --force --yes {{ item }}"
# with_items: "{{ pvs_to_remove.stdout_lines }}"
# when:
# - pvs_to_remove is defined
# - pvs_to_remove.stdout_lines|length > 0

0 comments on commit 99e9246

Please sign in to comment.