From: Guillaume Abrioux Date: Thu, 13 Sep 2018 09:18:56 +0000 (+0200) Subject: shrink-osd: fix purge osd on containerized deployment X-Git-Tag: v3.2.0beta2~8 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4159326a182d15376bf5e5913da4bb6281e27957;p=ceph-ansible.git shrink-osd: fix purge osd on containerized deployment ce1dd8d introduced the purge osd on containers but it was incorrect. `resolve parent device` and `zap ceph osd disks` tasks must be delegated to their respective OSD nodes. Indeed, they were run on the ansible node, it means it was trying to resolve parent devices from this node where it should be done on OSD nodes. Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1612095 Signed-off-by: Guillaume Abrioux --- diff --git a/infrastructure-playbooks/shrink-osd.yml b/infrastructure-playbooks/shrink-osd.yml index 1e6397fe1..f1c2d82f4 100644 --- a/infrastructure-playbooks/shrink-osd.yml +++ b/infrastructure-playbooks/shrink-osd.yml @@ -131,10 +131,12 @@ - containerized_deployment - name: resolve parent device - command: lsblk --nodeps -no pkname "{{ item.stdout }}" + command: lsblk --nodeps -no pkname "{{ item.0.stdout }}" register: resolved_parent_device - with_items: + delegate_to: "{{ item.1 }}" + with_together: - "{{ osd_to_kill_disks.results }}" + - "{{ osd_hosts }}" when: - containerized_deployment @@ -142,13 +144,15 @@ shell: | docker run --rm \ --privileged=true \ - --name ceph-osd-zap-{{ ansible_hostname }}-{{ item.stdout }} \ + --name ceph-osd-zap-{{ ansible_hostname }}-{{ item.0.stdout }} \ -v /dev/:/dev/ \ - -e OSD_DEVICE=/dev/{{ item.stdout }} \ + -e OSD_DEVICE=/dev/{{ item.0.stdout }} \ {{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }} \ zap_device - with_items: + delegate_to: "{{ item.1 }}" + with_together: - "{{ resolved_parent_device.results }}" + - "{{ osd_hosts }}" when: - containerized_deployment