7b6fbdf41d
This was an attempt to get storage_interface to work properly but that work will not be completed and functional this cycle. There are design topics that need to be discussed about it that were brought to light by the RAX gate failing for it. TrivialFix Change-Id: I65579f9e0e0dcf3fa51c0ea031ff474145457c40
70 lines
2.7 KiB
YAML
70 lines
2.7 KiB
YAML
---
|
|
- name: Looking up disks to bootstrap for Ceph
|
|
command: docker exec -t kolla_toolbox /usr/bin/ansible localhost
|
|
-m find_disks
|
|
-a "partition_name='KOLLA_CEPH_OSD_BOOTSTRAP'"
|
|
register: osd_lookup
|
|
changed_when: "{{ osd_lookup.stdout.find('localhost | SUCCESS => ') != -1 and (osd_lookup.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed }}"
|
|
failed_when: osd_lookup.stdout.split()[2] != 'SUCCESS'
|
|
|
|
- name: Reading data from variable
|
|
set_fact:
|
|
osds_bootstrap: "{{ (osd_lookup.stdout.split('localhost | SUCCESS => ')[1]|from_json).disks|from_json }}"
|
|
|
|
- name: Looking up disks to bootstrap for Ceph
|
|
command: docker exec -t kolla_toolbox /usr/bin/ansible localhost
|
|
-m find_disks
|
|
-a "partition_name='KOLLA_CEPH_OSD_CACHE_BOOTSTRAP'"
|
|
register: osd_cache_lookup
|
|
changed_when: "{{ osd_cache_lookup.stdout.find('localhost | SUCCESS => ') != -1 and (osd_cache_lookup.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed }}"
|
|
failed_when: osd_cache_lookup.stdout.split()[2] != 'SUCCESS'
|
|
|
|
- name: Reading data from variable
|
|
set_fact:
|
|
osds_cache_bootstrap: "{{ (osd_cache_lookup.stdout.split('localhost | SUCCESS => ')[1]|from_json).disks|from_json }}"
|
|
|
|
- name: Bootstrapping Ceph OSDs
|
|
kolla_docker:
|
|
action: "start_container"
|
|
common_options: "{{ docker_common_options }}"
|
|
detach: False
|
|
environment:
|
|
KOLLA_BOOTSTRAP:
|
|
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
|
|
OSD_DEV: "{{ item.1.device }}"
|
|
OSD_INITIAL_WEIGHT: "{{ osd_initial_weight }}"
|
|
HOSTNAME: "{{ hostvars[inventory_hostname]['ansible_' + storage_interface]['ipv4']['address'] }}"
|
|
image: "{{ ceph_osd_image_full }}"
|
|
labels:
|
|
BOOTSTRAP:
|
|
name: "bootstrap_osd_{{ item.0 }}"
|
|
privileged: True
|
|
restart_policy: "never"
|
|
volumes:
|
|
- "{{ node_config_directory }}/ceph-osd/:{{ container_config_directory }}/:ro"
|
|
- "/dev/:/dev/"
|
|
with_indexed_items: osds_bootstrap|default([])
|
|
|
|
- name: Bootstrapping Ceph Cache OSDs
|
|
kolla_docker:
|
|
action: "start_container"
|
|
common_options: "{{ docker_common_options }}"
|
|
detach: False
|
|
environment:
|
|
KOLLA_BOOTSTRAP:
|
|
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
|
|
CEPH_CACHE:
|
|
OSD_DEV: "{{ item.1.device }}"
|
|
OSD_INITIAL_WEIGHT: "{{ osd_initial_weight }}"
|
|
HOSTNAME: "{{ hostvars[inventory_hostname]['ansible_' + storage_interface]['ipv4']['address'] }}"
|
|
image: "{{ ceph_osd_image_full }}"
|
|
labels:
|
|
BOOTSTRAP:
|
|
name: "bootstrap_osd_cache_{{ item.0 }}"
|
|
privileged: True
|
|
restart_policy: "never"
|
|
volumes:
|
|
- "{{ node_config_directory }}/ceph-osd/:{{ container_config_directory }}/:ro"
|
|
- "/dev/:/dev/"
|
|
with_indexed_items: osds_cache_bootstrap|default([])
|