Merge "Configure the Multipathd service"
This commit is contained in:
commit
d14ed08e51
@ -48,6 +48,14 @@ parameters:
|
||||
default: 10280
|
||||
description: The size of the loopback file used by the cinder LVM driver.
|
||||
type: number
|
||||
MultipathdEnable:
|
||||
default: false
|
||||
description: Whether to enable the multipath daemon
|
||||
type: boolean
|
||||
|
||||
conditions:
|
||||
|
||||
multipathd_enabled: {equals: [{get_param: MultipathdEnable}, true]}
|
||||
|
||||
resources:
|
||||
|
||||
@ -160,6 +168,11 @@ outputs:
|
||||
- /var/lib/cinder:/var/lib/cinder:z
|
||||
- /var/lib/iscsi:/var/lib/iscsi:z
|
||||
- /var/log/containers/cinder:/var/log/cinder:z
|
||||
-
|
||||
if:
|
||||
- multipathd_enabled
|
||||
- - /etc/multipath:/etc/multipath:z
|
||||
- []
|
||||
|
||||
cinder_volume_environment:
|
||||
description: Docker environment for the cinder-volume container (HA or non-HA)
|
||||
@ -190,6 +203,11 @@ outputs:
|
||||
- /var/lib/cinder:/var/lib/cinder:z
|
||||
- /var/lib/iscsi:/var/lib/iscsi:z
|
||||
- /var/log/containers/cinder:/var/log/cinder:z
|
||||
-
|
||||
if:
|
||||
- multipathd_enabled
|
||||
- - /etc/multipath:/etc/multipath:z
|
||||
- []
|
||||
|
||||
cinder_backup_environment:
|
||||
description: Docker environment for the cinder-backup container (HA or non-HA)
|
||||
|
@ -205,6 +205,10 @@ parameters:
|
||||
description: >
|
||||
The Ceph cluster name must be at least 1 character and contain only
|
||||
letters and numbers.
|
||||
MultipathdEnable:
|
||||
default: false
|
||||
description: Whether to enable the multipath daemon
|
||||
type: boolean
|
||||
GlanceApiOptVolumes:
|
||||
default: []
|
||||
description: list of optional volumes to be mounted
|
||||
@ -220,6 +224,12 @@ conditions:
|
||||
|
||||
internal_tls_enabled: {equals: [{get_param: EnableInternalTLS}, true]}
|
||||
cinder_backend_enabled: {equals: [{get_param: GlanceBackend}, cinder]}
|
||||
cinder_multipathd_enabled:
|
||||
and:
|
||||
- cinder_backend_enabled
|
||||
- equals:
|
||||
- get_param: MultipathdEnable
|
||||
- true
|
||||
rbd_backend_enabled: {equals: [{get_param: GlanceBackend}, rbd]}
|
||||
use_tls_proxy: {equals : [{get_param: EnableInternalTLS}, true]}
|
||||
glance_workers_unset: {equals : [{get_param: GlanceWorkers}, '']}
|
||||
@ -501,6 +511,11 @@ outputs:
|
||||
- /etc/iscsi:/etc/iscsi
|
||||
- /var/lib/iscsi:/var/lib/iscsi:z
|
||||
- []
|
||||
-
|
||||
if:
|
||||
- cinder_multipathd_enabled
|
||||
- - /etc/multipath:/etc/multipath:z
|
||||
- []
|
||||
environment:
|
||||
- KOLLA_BOOTSTRAP=True
|
||||
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
|
||||
|
@ -10,6 +10,18 @@ parameters:
|
||||
ContainerMultipathdConfigImage:
|
||||
description: The container image to use for the multipathd config_volume
|
||||
type: string
|
||||
MultipathdEnable:
|
||||
default: false
|
||||
description: Whether to enable the multipath daemon
|
||||
type: boolean
|
||||
MultipathdEnableUserFriendlyNames:
|
||||
default: false
|
||||
description: Whether to enable assigning a user friendly name to each path
|
||||
type: boolean
|
||||
MultipathdEnableFindMultipaths:
|
||||
default: true
|
||||
description: Whether to automatically create a multipath device for each path
|
||||
type: boolean
|
||||
EndpointMap:
|
||||
default: {}
|
||||
description: Mapping of service endpoint -> protocol. Typically set
|
||||
@ -37,6 +49,12 @@ parameters:
|
||||
default: {}
|
||||
type: json
|
||||
|
||||
conditions:
|
||||
|
||||
multipathd_enabled: {equals: [{get_param: MultipathdEnable}, true]}
|
||||
user_friendly_names_enabled: {equals: [{get_param: MultipathdEnableUserFriendlyNames}, true]}
|
||||
find_multipaths_enabled: {equals: [{get_param: MultipathdEnableFindMultipaths}, true]}
|
||||
|
||||
resources:
|
||||
|
||||
ContainersCommon:
|
||||
@ -52,12 +70,38 @@ outputs:
|
||||
# BEGIN DOCKER SETTINGS
|
||||
puppet_config:
|
||||
config_volume: multipathd
|
||||
step_config: ''
|
||||
puppet_tags: exec
|
||||
step_config:
|
||||
str_replace:
|
||||
template: |
|
||||
exec { "update multipath.conf":
|
||||
command => "/usr/sbin/mpathconf CMD --with_multipathd n --user_friendly_names UFN --find_multipaths FM"
|
||||
}
|
||||
params:
|
||||
CMD:
|
||||
if:
|
||||
- multipathd_enabled
|
||||
- '--enable'
|
||||
- '--disable'
|
||||
UFN:
|
||||
if:
|
||||
- user_friendly_names_enabled
|
||||
- 'y'
|
||||
- 'n'
|
||||
FM:
|
||||
if:
|
||||
- find_multipaths_enabled
|
||||
- 'y'
|
||||
- 'n'
|
||||
config_image: {get_param: ContainerMultipathdConfigImage}
|
||||
kolla_config:
|
||||
/var/lib/kolla/config_files/multipathd.json:
|
||||
command: /usr/sbin/multipathd -d
|
||||
config_files:
|
||||
- source: "/var/lib/kolla/config_files/src/*"
|
||||
dest: "/"
|
||||
merge: true
|
||||
preserve_properties: true
|
||||
- source: "/var/lib/kolla/config_files/src-iscsid/*"
|
||||
dest: "/etc/iscsi/"
|
||||
merge: true
|
||||
@ -77,22 +121,38 @@ outputs:
|
||||
- {get_attr: [ContainersCommon, volumes]}
|
||||
-
|
||||
- /var/lib/kolla/config_files/multipathd.json:/var/lib/kolla/config_files/config.json:ro
|
||||
- /var/lib/config-data/puppet-generated/multipathd/:/var/lib/kolla/config_files/src:ro
|
||||
- /etc/iscsi:/var/lib/kolla/config_files/src-iscsid:ro
|
||||
- /dev/:/dev/
|
||||
- /run/:/run/
|
||||
- /sys:/sys
|
||||
- /lib/modules:/lib/modules:ro
|
||||
- /var/lib/cinder:/var/lib/cinder:z
|
||||
- /var/lib/iscsi:/var/lib/iscsi:z
|
||||
- /etc/multipath:/etc/multipath:z
|
||||
environment:
|
||||
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
|
||||
host_prep_tasks:
|
||||
- name: Check if multipathd is deployed on the host
|
||||
command: systemctl is-enabled --quiet multipathd
|
||||
ignore_errors: True
|
||||
register: multipathd_enabled_result
|
||||
- name: Set fact multipathd_enabled
|
||||
set_fact:
|
||||
multipathd_enabled: "{{ multipathd_enabled_result.rc == 0 }}"
|
||||
- name: Stop multipathd on the host
|
||||
service: name=multipathd state=stopped enabled=no
|
||||
when: multipathd_enabled|bool
|
||||
- name: load dm-multipath
|
||||
import_role:
|
||||
name: tripleo-module-load
|
||||
vars:
|
||||
modules:
|
||||
- name: dm-multipath
|
||||
- name: prepare /etc/multipath
|
||||
file:
|
||||
path: /etc/multipath
|
||||
state: directory
|
||||
setype: svirt_sandbox_file_t
|
||||
upgrade_tasks: []
|
||||
post_upgrade_tasks:
|
||||
- when: step|int == 1
|
||||
|
@ -311,6 +311,10 @@ parameters:
|
||||
description: Whether to wait for `network-vif-plugged` events before starting guest transfer.
|
||||
default: true
|
||||
type: boolean
|
||||
MultipathdEnable:
|
||||
default: false
|
||||
description: Whether to enable the multipath daemon
|
||||
type: boolean
|
||||
|
||||
resources:
|
||||
|
||||
@ -653,6 +657,11 @@ outputs:
|
||||
- /var/lib/libvirt:/var/lib/libvirt:shared,z
|
||||
- /sys/class/net:/sys/class/net
|
||||
- /sys/bus/pci:/sys/bus/pci
|
||||
-
|
||||
if:
|
||||
- {equals: [{get_param: MultipathdEnable}, true]}
|
||||
- - /etc/multipath:/etc/multipath:z
|
||||
- []
|
||||
environment:
|
||||
list_concat:
|
||||
- {get_param: NovaComputeOptEnvVars}
|
||||
|
@ -40,6 +40,10 @@ parameters:
|
||||
description: The password for the Ironic service and db account, used by the Ironic services
|
||||
type: string
|
||||
hidden: true
|
||||
MultipathdEnable:
|
||||
default: false
|
||||
description: Whether to enable the multipath daemon
|
||||
type: boolean
|
||||
|
||||
resources:
|
||||
|
||||
@ -147,6 +151,11 @@ outputs:
|
||||
- /var/lib/iscsi:/var/lib/iscsi:z
|
||||
- /var/lib/nova/:/var/lib/nova:shared,z
|
||||
- /var/log/containers/nova:/var/log/nova:z
|
||||
-
|
||||
if:
|
||||
- {equals: [{get_param: MultipathdEnable}, true]}
|
||||
- - /etc/multipath:/etc/multipath:z
|
||||
- []
|
||||
environment:
|
||||
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
|
||||
nova_wait_for_compute_service:
|
||||
|
5
environments/multipathd.yaml
Normal file
5
environments/multipathd.yaml
Normal file
@ -0,0 +1,5 @@
|
||||
resource_registry:
|
||||
OS::TripleO::Services::Multipathd: ../deployment/multipathd/multipathd-container.yaml
|
||||
|
||||
parameter_defaults:
|
||||
MultipathdEnable: true
|
@ -0,0 +1,6 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
Add support for the Multipathd service on nodes that access Block Storage
|
||||
(cinder) volumes. Multipathd is an optional service that can be enabled
|
||||
by including environments/multipathd.yaml in the deployment.
|
Loading…
Reference in New Issue
Block a user