diff --git a/ansible/kolla-openstack.yml b/ansible/kolla-openstack.yml index c334bcd3b..cd331f15e 100644 --- a/ansible/kolla-openstack.yml +++ b/ansible/kolla-openstack.yml @@ -128,6 +128,7 @@ - { name: mariabackup, file: backup.my.cnf } - { name: mariadb, file: galera.cnf } - { name: masakari, file: masakari.conf } + - { name: multipathd, file: multipath.conf } - { name: murano, file: murano.conf } - { name: neutron, file: neutron.conf } - { name: neutron_ml2, file: neutron/ml2_conf.ini } @@ -237,6 +238,7 @@ kolla_extra_mariabackup: "{{ kolla_extra_config.mariabackup | default }}" kolla_extra_mariadb: "{{ kolla_extra_config.mariadb | default }}" kolla_extra_masakari: "{{ kolla_extra_config.masakari | default }}" + kolla_extra_multipathd: "{{ kolla_extra_config.multipathd | default }}" kolla_extra_murano: "{{ kolla_extra_config.murano | default }}" kolla_extra_neutron: "{{ kolla_extra_config.neutron | default }}" kolla_extra_neutron_ml2: "{{ kolla_extra_config.neutron_ml2 | default }}" diff --git a/ansible/roles/kolla-openstack/defaults/main.yml b/ansible/roles/kolla-openstack/defaults/main.yml index 0e3b3f43c..ed3fb18a4 100644 --- a/ansible/roles/kolla-openstack/defaults/main.yml +++ b/ansible/roles/kolla-openstack/defaults/main.yml @@ -358,6 +358,15 @@ kolla_enable_masakari: # Free form extra configuration to append to masakari.conf. kolla_extra_masakari: +############################################################################### +# Multipathd configuration. + +# Whether to enable Multipathd. +kolla_enable_multipathd: + +# Free form extra configuration to append to multipath.conf. +kolla_extra_multipathd: + ############################################################################### # Murano configuration. diff --git a/ansible/roles/kolla-openstack/molecule/enable-everything/molecule.yml b/ansible/roles/kolla-openstack/molecule/enable-everything/molecule.yml index 491d57b30..264ef1cb1 100644 --- a/ansible/roles/kolla-openstack/molecule/enable-everything/molecule.yml +++ b/ansible/roles/kolla-openstack/molecule/enable-everything/molecule.yml @@ -98,6 +98,10 @@ provisioner: kolla_extra_masakari: | [extra-masakari.conf] foo=bar + kolla_enable_multipathd: true + kolla_extra_multipathd: | + [extra-multipath.conf] + foo=bar kolla_enable_murano: true kolla_extra_murano: | [extra-murano.conf] diff --git a/ansible/roles/kolla-openstack/molecule/enable-everything/tests/test_default.py b/ansible/roles/kolla-openstack/molecule/enable-everything/tests/test_default.py index 73427804b..aabd19d10 100644 --- a/ansible/roles/kolla-openstack/molecule/enable-everything/tests/test_default.py +++ b/ansible/roles/kolla-openstack/molecule/enable-everything/tests/test_default.py @@ -76,6 +76,7 @@ def test_service_config_directory(host, path): 'magnum.conf', 'manila.conf', 'masakari.conf', + 'multipath.conf', 'murano.conf', 'neutron/ml2_conf.ini', 'neutron.conf', diff --git a/ansible/roles/kolla-openstack/tasks/config.yml b/ansible/roles/kolla-openstack/tasks/config.yml index 82b4708dc..42f1775ea 100644 --- a/ansible/roles/kolla-openstack/tasks/config.yml +++ b/ansible/roles/kolla-openstack/tasks/config.yml @@ -34,6 +34,7 @@ - { src: backup.my.cnf.j2, dest: backup.my.cnf, enabled: "{{ kolla_enable_mariabackup }}" } - { src: masakari.conf.j2, dest: masakari.conf, enabled: "{{ kolla_enable_masakari }}" } - { src: ml2_conf.ini.j2, dest: neutron/ml2_conf.ini, enabled: "{{ kolla_enable_neutron }}" } + - { src: multipath.conf.j2, dest: multipath.conf, enabled: "{{ kolla_enable_multipathd }}" } - { src: murano.conf.j2, dest: murano.conf, enabled: "{{ kolla_enable_murano }}" } - { src: neutron.conf.j2, dest: neutron.conf, enabled: "{{ kolla_enable_neutron }}" } - { src: nova.conf.j2, dest: nova.conf, enabled: "{{ kolla_enable_nova }}" } diff --git a/ansible/roles/kolla-openstack/templates/multipath.conf.j2 b/ansible/roles/kolla-openstack/templates/multipath.conf.j2 new file mode 100644 index 000000000..2bc8580d7 --- /dev/null +++ b/ansible/roles/kolla-openstack/templates/multipath.conf.j2 @@ -0,0 +1,9 @@ +# {{ ansible_managed }} + +{% if kolla_extra_multipathd %} +####################### +# Extra configuration +####################### + +{{ kolla_extra_multipathd }} +{% endif %} diff --git a/doc/source/configuration/reference/kolla-ansible.rst b/doc/source/configuration/reference/kolla-ansible.rst index d28c78892..27f9f638f 100644 --- a/doc/source/configuration/reference/kolla-ansible.rst +++ b/doc/source/configuration/reference/kolla-ansible.rst @@ -707,6 +707,7 @@ which files are supported. ``mariadb/*`` Extended MariaDB configuration. ``masakari.conf`` Masakari configuration. ``masakari/*`` Extended masakari configuration. + ``multipath.conf`` Multipathd configuration. ``murano.conf`` Murano configuration. ``murano/*`` Extended murano configuration. ``neutron.conf`` Neutron configuration. diff --git a/releasenotes/notes/add-extended-multipath-conf-a6b874fb0f43fed5.yaml b/releasenotes/notes/add-extended-multipath-conf-a6b874fb0f43fed5.yaml new file mode 100644 index 000000000..960c6d6d7 --- /dev/null +++ b/releasenotes/notes/add-extended-multipath-conf-a6b874fb0f43fed5.yaml @@ -0,0 +1,3 @@ +--- +features: + - Adds support for custom Multipathd configuration.