]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
purge-docker: fix ceph-osd-zap name container v3.0.23
authorGuillaume Abrioux <gabrioux@redhat.com>
Fri, 2 Feb 2018 10:55:18 +0000 (11:55 +0100)
committerGuillaume Abrioux <gabrioux@redhat.com>
Fri, 2 Feb 2018 21:14:03 +0000 (22:14 +0100)
the `zap ceph osd disks` task should iter on `resolved_parent_device`
instead of `combined_devices_list` which contain only the base device
name (vs. full path name in `combined_devices_list`).

this fixes the issue where docker complain about container name because
of illegal characters such as `/` :
```
"/usr/bin/docker-current: Error response from daemon: Invalid container
name (ceph-osd-zap-magna074-/dev/sdb1), only [a-zA-Z0-9][a-zA-Z0-9_.-]
are allowed.","See '/usr/bin/docker-current run --help'."
""
```

having the the basename of the device path is enough for the container
name.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1540137
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 3b2f6c34e42eae4033a209d819620211dc68c34b)

infrastructure-playbooks/purge-docker-cluster.yml

index 9d331f3b394492c75618229579dc894f66bc823d..3acd4589a1336d7ba2e08049ce1a807f3e1fc276 100644 (file)
       {{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }} \
       zap_device
     with_items:
-      - "{{ combined_devices_list }}"
+      - "{{ resolved_parent_device }}"
 
   - name: wait until the zap containers die
     shell: |
       name: "ceph-osd-zap-{{ ansible_hostname }}-{{ item }}"
       state: absent
     with_items:
-      - "{{ combined_devices_list }}"
+      - "{{ resolved_parent_device }}"
 
   - name: remove ceph osd service
     file: