Merge pull request #2145 from ceph/fix-autodiscover

osd: do not use dm when osd_auto_discovery
pull/2150/head
Guillaume Abrioux 2017-11-08 11:56:51 +01:00 committed by GitHub
commit b9ee96b56a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 7 deletions

View File

@ -28,6 +28,7 @@
- item.value.removable == "0"
- item.value.partitions|count == 0
- item.value.holders|count == 0
- "'dm-' not in item.key"
- name: include check_devices.yml
include: check_devices.yml

View File

@ -33,7 +33,7 @@
docker run --net=host \
--pid=host \
--privileged=true \
--name=ceph-osd-prepare-{{ ansible_hostname }}-{{ item.key }} \
--name=ceph-osd-prepare-{{ ansible_hostname }}-{{ item.split('/')[-1] }} \
-v /etc/ceph:/etc/ceph \
-v /var/lib/ceph/:/var/lib/ceph/ \
-v /dev:/dev \
@ -41,18 +41,15 @@
-e DEBUG=verbose \
-e CLUSTER={{ cluster }} \
-e CEPH_DAEMON=OSD_CEPH_DISK_PREPARE \
-e OSD_DEVICE=/dev/{{ item.key }} \
-e OSD_DEVICE={{ item }} \
{{ docker_env_args }} \
{{ ceph_osd_docker_prepare_env }} \
{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}
with_dict: "{{ ansible_devices }}"
with_items: "{{ devices }}"
when:
- osd_auto_discovery
- containerized_deployment
- ansible_devices is defined
- item.value.removable == "0"
- item.value.partitions|count == 0
- item.value.holders|count == 0
- devices is defined
- name: manually prepare ceph "{{ osd_objectstore }}" non-containerized osd disk(s) with collocated osd data and journal
command: "ceph-disk prepare {{ ceph_disk_cli_options }} {{ item.1 }}"