Merge "Add multipathing support to docker container"
This commit is contained in:
commit
a354be493e
@ -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
|
||||
|
9
ansible/roles/multipathd/defaults/main.yml
Normal file
9
ansible/roles/multipathd/defaults/main.yml
Normal file
@ -0,0 +1,9 @@
|
||||
---
|
||||
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 }}"
|
24
ansible/roles/multipathd/tasks/config.yml
Normal file
24
ansible/roles/multipathd/tasks/config.yml
Normal file
@ -0,0 +1,24 @@
|
||||
---
|
||||
- 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"
|
4
ansible/roles/multipathd/tasks/deploy.yml
Normal file
4
ansible/roles/multipathd/tasks/deploy.yml
Normal file
@ -0,0 +1,4 @@
|
||||
---
|
||||
- include: config.yml
|
||||
|
||||
- include: start.yml
|
2
ansible/roles/multipathd/tasks/main.yml
Normal file
2
ansible/roles/multipathd/tasks/main.yml
Normal file
@ -0,0 +1,2 @@
|
||||
---
|
||||
- include: "{{ action }}.yml"
|
7
ansible/roles/multipathd/tasks/pull.yml
Normal file
7
ansible/roles/multipathd/tasks/pull.yml
Normal file
@ -0,0 +1,7 @@
|
||||
---
|
||||
- name: Pulling multipathd image
|
||||
kolla_docker:
|
||||
action: "pull_image"
|
||||
common_options: "{{ docker_common_options }}"
|
||||
image: "{{ multipathd_image_full }}"
|
||||
when: inventory_hostname in groups['multipathd']
|
1
ansible/roles/multipathd/tasks/reconfigure.yml
Normal file
1
ansible/roles/multipathd/tasks/reconfigure.yml
Normal file
@ -0,0 +1 @@
|
||||
---
|
21
ansible/roles/multipathd/tasks/start.yml
Normal file
21
ansible/roles/multipathd/tasks/start.yml
Normal file
@ -0,0 +1,21 @@
|
||||
---
|
||||
- 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']
|
5
ansible/roles/multipathd/tasks/upgrade.yml
Normal file
5
ansible/roles/multipathd/tasks/upgrade.yml
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
- include: config.yml
|
||||
|
||||
- include: start.yml
|
||||
serial: "30%"
|
11
ansible/roles/multipathd/templates/multipath.conf.j2
Normal file
11
ansible/roles/multipathd/templates/multipath.conf.j2
Normal file
@ -0,0 +1,11 @@
|
||||
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]*"
|
||||
}
|
11
ansible/roles/multipathd/templates/multipathd.json.j2
Normal file
11
ansible/roles/multipathd/templates/multipathd.json.j2
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
"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,
|
||||
|
18
docker/multipathd/Dockerfile.j2
Normal file
18
docker/multipathd/Dockerfile.j2
Normal file
@ -0,0 +1,18 @@
|
||||
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"
|
||||
|
3
releasenotes/notes/add-multipath-9ee29be1fcea6d94.yaml
Normal file
3
releasenotes/notes/add-multipath-9ee29be1fcea6d94.yaml
Normal file
@ -0,0 +1,3 @@
|
||||
---
|
||||
features:
|
||||
- Add multipathing support to docker container.
|
Loading…
Reference in New Issue
Block a user