shrink-osd: purge osd on containerized deployment

Prior to this commit we were only stopping the container, but now we
also purge the devices.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1572933
Signed-off-by: Sébastien Han <seb@redhat.com>
pull/2902/head
Sébastien Han 2018-07-18 16:20:47 +02:00 committed by mergify[bot]
parent cf01e596b6
commit ce1dd8d2b3
1 changed files with 22 additions and 0 deletions

View File

@ -130,6 +130,28 @@
when:
- containerized_deployment
- name: resolve parent device
command: lsblk --nodeps -no pkname "{{ item.stdout }}"
register: resolved_parent_device
with_items:
- "{{ osd_to_kill_disks.results }}"
when:
- containerized_deployment
- name: zap ceph osd disks
shell: |
docker run --rm \
--privileged=true \
--name ceph-osd-zap-{{ ansible_hostname }}-{{ item.stdout }} \
-v /dev/:/dev/ \
-e OSD_DEVICE=/dev/{{ item.stdout }} \
{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }} \
zap_device
with_items:
- "{{ resolved_parent_device.results }}"
when:
- containerized_deployment
- name: deactivating osd(s)
command: ceph-disk deactivate --cluster {{ cluster }} --deactivate-by-id {{ item.0 }} --mark-out
run_once: true