From: Sébastien Han Date: Fri, 27 Jul 2018 14:52:19 +0000 (+0200) Subject: osd: do not remove expose_partition container X-Git-Tag: v3.2.0beta2~93 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=2ca8c519066555e06a261d5dee3fb46ce5daad0b;p=ceph-ansible.git osd: do not remove expose_partition container The container runs with --rm which means it will be deleted by Docker when exiting. Also 'docker rm -f' is not idempotent and returns 1 if the container does not exist. Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1609007 Signed-off-by: Sébastien Han --- diff --git a/roles/ceph-osd/templates/ceph-osd-run.sh.j2 b/roles/ceph-osd/templates/ceph-osd-run.sh.j2 index 58151e65f..f91166b31 100644 --- a/roles/ceph-osd/templates/ceph-osd-run.sh.j2 +++ b/roles/ceph-osd/templates/ceph-osd-run.sh.j2 @@ -9,7 +9,6 @@ DOCKER_ENV="" {% if disk_list.get('rc') == 0 -%} function expose_partitions () { DOCKER_ENV=$(docker run --rm --net=host --name expose_partitions_${1} --privileged=true -v /dev/:/dev/ -v /etc/ceph:/etc/ceph:z -e CLUSTER={{ cluster }} -e OSD_DEVICE=/dev/${1} {{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }} disk_list) - docker rm -f expose_partitions_${1} } {% else -%} # NOTE(leseb): maintains backwards compatibility with old ceph-docker Jewel images