mirror of https://github.com/ceph/ceph-ansible.git
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
parent
cf01e596b6
commit
ce1dd8d2b3
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue