2018-03-05 19:28:35 +01:00
|
|
|
heat_template_version: rocky
|
2017-05-18 10:29:50 -04:00
|
|
|
|
|
|
|
description: >
|
|
|
|
OpenStack containerized Multipathd service
|
|
|
|
|
|
|
|
parameters:
|
|
|
|
DockerMultipathdImage:
|
|
|
|
description: image
|
|
|
|
type: string
|
2017-06-23 18:21:43 +02:00
|
|
|
DockerMultipathdConfigImage:
|
|
|
|
description: The container image to use for the multipathd config_volume
|
|
|
|
type: string
|
2017-05-18 10:29:50 -04:00
|
|
|
EndpointMap:
|
|
|
|
default: {}
|
|
|
|
description: Mapping of service endpoint -> protocol. Typically set
|
|
|
|
via parameter_defaults in the resource registry.
|
|
|
|
type: json
|
2017-06-22 17:25:03 +02:00
|
|
|
ServiceData:
|
|
|
|
default: {}
|
|
|
|
description: Dictionary packing service data
|
|
|
|
type: json
|
2017-05-18 10:29:50 -04:00
|
|
|
ServiceNetMap:
|
|
|
|
default: {}
|
|
|
|
description: Mapping of service_name -> network name. Typically set
|
|
|
|
via parameter_defaults in the resource registry. This
|
|
|
|
mapping overrides those in ServiceNetMapDefaults.
|
|
|
|
type: json
|
|
|
|
RoleName:
|
|
|
|
default: ''
|
|
|
|
description: Role name on which the service is applied
|
|
|
|
type: string
|
|
|
|
RoleParameters:
|
|
|
|
default: {}
|
|
|
|
description: Parameters specific to the role
|
|
|
|
type: json
|
|
|
|
DefaultPasswords:
|
|
|
|
default: {}
|
|
|
|
type: json
|
|
|
|
|
|
|
|
resources:
|
|
|
|
|
|
|
|
ContainersCommon:
|
|
|
|
type: ./containers-common.yaml
|
|
|
|
|
|
|
|
outputs:
|
|
|
|
role_data:
|
|
|
|
description: Role data for the Multipathd API role.
|
|
|
|
value:
|
|
|
|
service_name: multipathd
|
|
|
|
config_settings: {}
|
|
|
|
service_config_settings: {}
|
|
|
|
# BEGIN DOCKER SETTINGS
|
|
|
|
puppet_config:
|
|
|
|
config_volume: multipathd
|
|
|
|
#puppet_tags: file
|
|
|
|
step_config: ''
|
2017-07-12 11:41:57 +12:00
|
|
|
config_image: {get_param: DockerMultipathdConfigImage}
|
2017-05-18 10:29:50 -04:00
|
|
|
kolla_config:
|
|
|
|
/var/lib/kolla/config_files/multipathd.json:
|
|
|
|
command: /usr/sbin/multipathd -d
|
Fix up multipath docker indentation
Deploying a multipathd container gives the following error:
failed: [localhost] (item={'key': u'config_files', 'value': [{u'dest': u'/', u'merge': True, u'source':
u'/var/lib/kolla/config_files/src-iscsid/*', u'preserve_properties': True}]}) =>
{\"checksum\": \"72ad81489381571c5043b7613f6828b06ae364bd\", \"failed\": true, \"item\":
{\"key\": \"config_files\", \"value\": [{\"dest\": \"/\", \"merge\": true, \"preserve_properties\": true,
\"source\": \"/var/lib/kolla/config_files/src-iscsid/*\"}]}, \"msg\": \"Destination directory does not exist\"}
The reason is the wrong indentation of the config_files key in the
multipath docker service.
Change-Id: I0e1fbb9eb188a903994b9e5da90ab4a6fb81f00a
Closes-Bug: #1708129
2017-08-02 11:55:23 +02:00
|
|
|
config_files:
|
|
|
|
- source: "/var/lib/kolla/config_files/src-iscsid/*"
|
2018-01-09 10:46:36 +01:00
|
|
|
dest: "/etc/iscsi/"
|
Fix up multipath docker indentation
Deploying a multipathd container gives the following error:
failed: [localhost] (item={'key': u'config_files', 'value': [{u'dest': u'/', u'merge': True, u'source':
u'/var/lib/kolla/config_files/src-iscsid/*', u'preserve_properties': True}]}) =>
{\"checksum\": \"72ad81489381571c5043b7613f6828b06ae364bd\", \"failed\": true, \"item\":
{\"key\": \"config_files\", \"value\": [{\"dest\": \"/\", \"merge\": true, \"preserve_properties\": true,
\"source\": \"/var/lib/kolla/config_files/src-iscsid/*\"}]}, \"msg\": \"Destination directory does not exist\"}
The reason is the wrong indentation of the config_files key in the
multipath docker service.
Change-Id: I0e1fbb9eb188a903994b9e5da90ab4a6fb81f00a
Closes-Bug: #1708129
2017-08-02 11:55:23 +02:00
|
|
|
merge: true
|
|
|
|
preserve_properties: true
|
2017-05-18 10:29:50 -04:00
|
|
|
docker_config:
|
|
|
|
step_3:
|
|
|
|
multipathd:
|
|
|
|
start_order: 1
|
2017-07-12 11:41:57 +12:00
|
|
|
image: {get_param: DockerMultipathdImage}
|
2017-05-18 10:29:50 -04:00
|
|
|
net: host
|
|
|
|
privileged: true
|
|
|
|
restart: always
|
2018-01-30 12:18:02 +01:00
|
|
|
healthcheck:
|
|
|
|
test: /openstack/healthcheck
|
2017-05-18 10:29:50 -04:00
|
|
|
volumes:
|
|
|
|
list_concat:
|
|
|
|
- {get_attr: [ContainersCommon, volumes]}
|
|
|
|
-
|
|
|
|
- /var/lib/kolla/config_files/multipathd.json:/var/lib/kolla/config_files/config.json:ro
|
2017-11-30 15:10:52 +01:00
|
|
|
- /etc/iscsi:/var/lib/kolla/config_files/src-iscsid:ro
|
2017-05-18 10:29:50 -04:00
|
|
|
- /dev/:/dev/
|
|
|
|
- /run/:/run/
|
|
|
|
- /sys:/sys
|
|
|
|
- /lib/modules:/lib/modules:ro
|
|
|
|
- /var/lib/cinder:/var/lib/cinder
|
|
|
|
environment:
|
|
|
|
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
|
|
|
|
host_prep_tasks:
|
|
|
|
upgrade_tasks:
|
2017-09-19 16:30:41 +02:00
|
|
|
- name: Check if multipathd is deployed
|
|
|
|
command: systemctl is-enabled --quiet multipathd
|
|
|
|
tags: common
|
|
|
|
ignore_errors: True
|
|
|
|
register: multipathd_enabled
|
|
|
|
- name: "PreUpgrade step0,validation: Check service multipathd is running"
|
|
|
|
command: systemctl is-active --quiet multipathd
|
2018-01-31 11:06:53 +01:00
|
|
|
when:
|
|
|
|
- step|int == 0
|
|
|
|
- multipathd_enabled.rc == 0
|
2017-10-11 09:51:08 +03:00
|
|
|
tags: validation
|
2017-05-18 10:29:50 -04:00
|
|
|
- name: Stop and disable multipathd service
|
2018-01-31 11:06:53 +01:00
|
|
|
when:
|
|
|
|
- step|int == 2
|
|
|
|
- multipathd_enabled.rc == 0
|
2017-05-18 10:29:50 -04:00
|
|
|
service: name=multipathd state=stopped enabled=no
|