From bb687777c8da07a002a2c0a0d8cc8ea428f10765 Mon Sep 17 00:00:00 2001 From: Michal Nasiadka Date: Wed, 22 Apr 2026 14:59:13 +0200 Subject: nova-compute: Copy multipath.conf into nova-compute container When using multipathd - nova-compute errors out with nonexisting /etc/multipath.conf - let's copy it in Closes-Bug: #2100614 Change-Id: I52716276ab58df57180dc5dec9d7ef1c537d7e8d Signed-off-by: Michal Nasiadka --- ansible/roles/nova-cell/tasks/config.yml | 20 ++++++++++++++++++++ ansible/roles/nova-cell/templates/multipath.conf.j2 | 8 ++++++++ .../roles/nova-cell/templates/nova-compute.json.j2 | 6 ++++++ 3 files changed, 34 insertions(+) create mode 100644 ansible/roles/nova-cell/templates/multipath.conf.j2 diff --git a/ansible/roles/nova-cell/tasks/config.yml b/ansible/roles/nova-cell/tasks/config.yml index 87104f89e..b6bd7e5d0 100644 --- a/ansible/roles/nova-cell/tasks/config.yml +++ b/ansible/roles/nova-cell/tasks/config.yml @@ -212,3 +212,23 @@ with_items: - nova-compute - nova-compute-ironic + +- name: Copying over multipath.conf + become: true + vars: + service: "{{ nova_cell_services['nova-compute'] }}" + ansible.builtin.template: + src: "{{ item }}" + dest: "{{ node_config_directory }}/nova-compute/multipath.conf" + mode: "0660" + with_first_found: + - files: + - "{{ node_custom_config }}/nova/{{ inventory_hostname }}/multipath.conf" + - "{{ node_custom_config }}/multipath/{{ inventory_hostname }}/multipath.conf" + - "{{ node_custom_config }}/nova/multipath.conf" + - "{{ node_custom_config }}/multipath.conf" + - "multipath.conf.j2" + skip: true + when: + - service | service_enabled_and_mapped_to_host + - enable_multipathd | bool diff --git a/ansible/roles/nova-cell/templates/multipath.conf.j2 b/ansible/roles/nova-cell/templates/multipath.conf.j2 new file mode 100644 index 000000000..478eef023 --- /dev/null +++ b/ansible/roles/nova-cell/templates/multipath.conf.j2 @@ -0,0 +1,8 @@ +defaults { + user_friendly_names no + find_multipaths yes + skip_kpartx yes +} + +blacklist { +} diff --git a/ansible/roles/nova-cell/templates/nova-compute.json.j2 b/ansible/roles/nova-cell/templates/nova-compute.json.j2 index 655ee0379..97bd5235e 100644 --- a/ansible/roles/nova-cell/templates/nova-compute.json.j2 +++ b/ansible/roles/nova-cell/templates/nova-compute.json.j2 @@ -79,6 +79,12 @@ "dest": "/var/lib/kolla/share/ca-certificates", "owner": "root", "perm": "0600" + }{% endif %}{% if enable_multipathd | bool %}, + { + "source": "{{ container_config_directory }}/multipath.conf", + "dest": "/etc/multipath.conf", + "owner": "root", + "perm": "0644" }{% endif %} ], "permissions": [ -- cgit v1.2.3