Skip to content
Snippets Groups Projects
Commit 115c55e1 authored by Carlos Cesario's avatar Carlos Cesario
Browse files

Add multipathing support to docker container

Due some cinder drivers need multipathing support like this one
http://docs.openstack.org/mitaka/config-reference/block-storage/drivers/ibm-storwize-svc-driver.html

This PS will allow to run these additional drivers when using Kolla.

Implements: blueprint multipath-support
Change-Id: Id6cf29f984c92773bbfc2f95daea573a74701648
parent 0f9534bc
No related branches found
No related tags found
No related merge requests found
Showing
with 134 additions and 0 deletions
......@@ -205,6 +205,7 @@ enable_magnum: "no"
enable_manila: "no"
enable_mistral: "no"
enable_mongodb: "no"
enable_multipathd: "no"
enable_murano: "no"
enable_neutron_lbaas: "no"
enable_neutron_qos: "no"
......
......@@ -244,3 +244,7 @@ ceilometer
[ceilometer-compute:children]
compute
# Multipathd
[multipathd:children]
compute
......@@ -256,3 +256,7 @@ ceilometer
[ceilometer-compute:children]
compute
# Multipathd
[multipathd:children]
compute
---
project_name: "multipathd"
####################
# Docker
####################
multipathd_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-multipathd"
multipathd_tag: "{{ openstack_release }}"
multipathd_image_full: "{{ multipathd_image }}:{{ multipathd_tag }}"
---
- name: Ensuring config directories exist
file:
path: "{{ node_config_directory }}/{{ item }}"
state: "directory"
recurse: yes
when: inventory_hostname in groups['compute']
with_items:
- "multipathd"
- name: Copying over config.json files for services
template:
src: "{{ item }}.json.j2"
dest: "{{ node_config_directory }}/{{ item }}/config.json"
when: inventory_hostname in groups['compute']
with_items:
- "multipathd"
- name: Copying over multipath.conf
template:
src: "{{ role_path }}/templates/multipath.conf.j2"
dest: "{{ node_config_directory }}/{{ item }}/multipath.conf"
with_items:
- "multipathd"
---
- include: config.yml
- include: start.yml
---
- include: "{{ action }}.yml"
---
- name: Pulling multipathd image
kolla_docker:
action: "pull_image"
common_options: "{{ docker_common_options }}"
image: "{{ multipathd_image_full }}"
when: inventory_hostname in groups['multipathd']
---
---
- name: Starting multipathd container
kolla_docker:
action: "start_container"
common_options: "{{ docker_common_options }}"
image: "{{ multipathd_image_full }}"
name: "multipathd"
ipc_mode: "host"
privileged: True
volumes:
- "{{ node_config_directory }}/multipathd/:{{ container_config_directory }}/:ro"
- "kolla_logs:/var/log/kolla/"
- "/etc/localtime:/etc/localtime:ro"
- "/dev/:/dev/"
- "/run/:/run/"
- "/sys/fs/cgroup:/sys/fs/cgroup:ro"
- "/lib/modules:/lib/modules:ro"
- "/sys/kernel/config:/configfs"
- "cinder:/var/lib/cinder"
- "iscsi_info:/etc/iscsi"
when: inventory_hostname in groups['compute']
---
- include: config.yml
- include: start.yml
serial: "30%"
defaults {
user_friendly_names no
polling_interval 30
}
blacklist {
devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*"
devnode "^sd[a]"
devnode "^hd[a-z]"
devnode "^cciss!c[0-9]d[0-9]*"
}
{
"command": "/sbin/multipathd -d",
"config_files": [
{
"source": "{{ container_config_directory }}/multipath.conf",
"dest": "/etc/multipath.conf",
"owner": "root",
"perm": "0600"
}
]
}
......@@ -22,6 +22,7 @@
- mariadb
- iscsid
- tgtd
- multipathd
- murano-api
- neutron-server
- nova-api
......@@ -60,6 +61,13 @@
tags: iscsi,
when: enable_iscsi | bool }
- hosts:
- multipathd
roles:
- { role: multipathd,
tags: multipathd,
when: enable_multipathd | bool }
- hosts: rabbitmq
roles:
- { role: rabbitmq,
......
FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }}
MAINTAINER {{ maintainer }}
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
RUN yum -y install \
device-mapper-multipath \
&& yum clean all
{% elif base_distro in ['ubuntu', 'debian'] %}
RUN apt-get -y install --no-install-recommends \
multipath-tools \
&& apt-get clean
{% endif %}
{{ include_footer }}
......@@ -120,6 +120,7 @@ neutron_external_interface: "eth1"
#enable_mistral: "no"
#enable_mongodb: "no"
#enable_murano: "no"
#enable_multipathd: "no"
#enable_neutron_lbaas: "no"
#enable_neutron_qos: "no"
#enable_swift: "no"
......
---
features:
- Add multipathing support to docker container.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment